Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this concurrency-safe? #7

Closed
yang opened this issue Jul 25, 2018 · 2 comments
Closed

Is this concurrency-safe? #7

yang opened this issue Jul 25, 2018 · 2 comments

Comments

@yang
Copy link

yang commented Jul 25, 2018

You have a single createConnection() happening once at the top of this example. I understand that creates a connection pool. But how does TypeORM when it should add vs reuse connections in the pool? (If you have two requests coming in at the same time, and each request handler makes some queries, how does TypeORM know which queries go to which connection?)

@yang
Copy link
Author

yang commented Jul 25, 2018

Moving this discussion to typeorm/typeorm#2581

@pleerock
Copy link
Member

Answered in there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants