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

How thread safe are promises? #68

Closed
dongryphon opened this issue Nov 7, 2018 · 6 comments
Closed

How thread safe are promises? #68

dongryphon opened this issue Nov 7, 2018 · 6 comments

Comments

@dongryphon
Copy link

After reading through the source for some time I do not see any use of locks (like the imported and ignored from threading import RLock) to protect one thread adding a callback to a promise instance from another thread that is resolving/rejecting that promise...

So is such use of a promise invalid or does it work because of the GIL? ... or something else?

Thanks for the awesome code!

@dongryphon
Copy link
Author

Would really appreciate even a couple words of wisdom on this...

@dongryphon
Copy link
Author

Is this the proper place to ask questions?

@jtschulz
Copy link

I am encountering some weirdness with heavy queries seemingly randomly failing and it is only reproducible when we're making multiple concurrent requests, so we're starting to wonder if this is related. We're still investigating, so it could be totally unrelated. I am however curious if anyone else has had similar experiences.

@chroth
Copy link

chroth commented Dec 18, 2018

@PepperTeasdale It sounds like your issue is related to #57

@jtschulz
Copy link

We could probably close this issue then, since the answer seems to be "no" and there are duplicate issues where people are getting errors from the threading issues. Unclear if there is any roadmap here or on graphene to fix these issues or supercede this project :(

@syrusakbary
Copy link
Owner

The PR #81 has been merged. Promises should be now thread-safe in Promise 2.3.0

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

4 participants