-
Notifications
You must be signed in to change notification settings - Fork 142
[worklets] don't run scripts from "in parallel" #370
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
Right but each We could instead say: And inside the for-loop inside import: /cc @domenic |
Yeah, that sounds reasonable, but |
(also did you want to review this change at all?) |
Happy to review PRs (I found out you have a few outstanding PRs without any kind of status, might want to check those). You do need to be explicit about ordering, since with "in parallel" the second call could happen before the first. No ordering guarantees. Also, the second call could finish during the execution of the first script, at which point you obviously can't run script, etc. (@domenic this is another reason we need "in parallel" to become threads with message passing.) |
Instead of relying on "in parallel" this change makes all the thread hopping explicit via. message passing and queue tasks on the appropriate event loop. - Fixes #372, changes arguments to fetch a module script graph. - Fixes #370, running scripts in parallel. Now the script explicitly are run within a task queued on the worklet global scope's event loop. - Fixes #318, actually runs the event loop. - Fixes #230, treats "fetch a module worker script graph" as asynchronous. - Probably fixes #225 ? I think I'm grabbing the correct state at each thread hop.
* [worklets] Multiple fixes to the {{Worklet/import()}} algorithm. Instead of relying on "in parallel" this change makes all the thread hopping explicit via. message passing and queue tasks on the appropriate event loop. - Fixes #372, changes arguments to fetch a module script graph. - Fixes #370, running scripts in parallel. Now the script explicitly are run within a task queued on the worklet global scope's event loop. - Fixes #318, actually runs the event loop. - Fixes #230, treats "fetch a module worker script graph" as asynchronous. - Probably fixes #225 ? I think I'm grabbing the correct state at each thread hop.
import() tries to do this, that doesn't work and leads to all kinds of undefined behavior. When you run script the world needs to be in some kind of stable state.
The text was updated successfully, but these errors were encountered: