-
Notifications
You must be signed in to change notification settings - Fork 85
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
import side-effect disables promise trampoline breaking DataLoaders #67
Comments
@alexmnazarenko Considering this thread-safe issue as fixed we can probably throw away invocation of |
We're seeing the exact same issue, enable_trampoline() fixed it |
Any example of where you (or anyone else who happens upon this issue) placed the (I assume if @AllexVeldman is correct on |
For sure
We do this in an AppConfig, so its enabled at bootup |
@matclayton Thank you for this! |
For what it's worth, our (@tony and I) issue was this: graphql-python/graphql-core-legacy#287 |
Are there any plans to remove |
On
import channels_graphql_ws
,promise.promise.async_instance.disable_trampoline()
is called, breaking DataLoaders.In the code there is a reference to syrusakbary/promise#57 (comment) which indicates this is needed due to Promise not being thread-safe.
This should no longer be needed with
promise ^2.3
syrusakbary/promise#81
https://github.com/syrusakbary/promise/releases/tag/v2.3.0
For some reason not completely clear to me yet this only impacts my unittests, the
async_instance
during normal operation seems to havetrampoline_enabled=True
.The text was updated successfully, but these errors were encountered: