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

Do mutexes work across isolates? #10

Closed
RickPoleshuck opened this issue Jun 13, 2022 · 1 comment
Closed

Do mutexes work across isolates? #10

RickPoleshuck opened this issue Jun 13, 2022 · 1 comment

Comments

@RickPoleshuck
Copy link

The documentation should be changed to answer this question.?

@hoylen
Copy link
Owner

hoylen commented Jun 13, 2022

Ok, I'll consider adding a note about it in the next release.

But if you try to use a mutex across isolates, you should quickly realise it is impossible. The only way to communicate between isolates is to use the Isolate.send() method that only sends messages, so there is no way to refer to the same mutex in two different isolates. And the isolates documentation says they are designed so you don't have to worry about mutexes or locks.

@hoylen hoylen closed this as completed Nov 27, 2022
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