-
-
Notifications
You must be signed in to change notification settings - Fork 587
Promises sometimes don't get called #390
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
Comments
1. when calling a Python function multiple times from Javascript, Promises will still get settled r0x0r#390 2. Add a per-browser ID so that return values are routed back to the correct client when you have multiple windows 3. allow calling python functions with multiple arguments
It looks like a race condition is in question here. As a function level global return value is used, it gets immediately overwritten by subsequent function calls. A solution would be to differentiate function calls by uuid or something along these lines. |
I wouldn’t call it a race condition but you’re spot on about the cause. I’m actively working on a fix. |
1. when calling a Python function multiple times from Javascript, Promises will still get settled r0x0r#390 2. Add a per-browser ID so that return values are routed back to the correct client when you have multiple windows 3. allow calling python functions with multiple arguments
I have pushed a tentative fix to the |
PR here |
|
Specification
Description
Initiate a function call from python to javascript multiple times. Observe that the function does get called multiple times but only one value is returned to Javascript via promise.
Javascript output:
Practicalities
YES I am willing to work on this issue myself.
NO I am not prepared to support this issue financially.
The text was updated successfully, but these errors were encountered: