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

Add Mutex class #1347

Closed
wants to merge 5 commits into from
Closed

Add Mutex class #1347

wants to merge 5 commits into from

Conversation

herwinw
Copy link
Member

@herwinw herwinw commented Oct 14, 2023

We'll need this one for the block/unblock in #1184. Most of the upstream specs will probably fail, since they all depend on threads, we might have to duplicate a few of them using fibers.

Once we have this one, we can probably build the other synchronisation primitives (like Queue and ConditionVariable) in plain Ruby using this Mutex class, and get the Scheduler hooks for free.

@herwinw herwinw self-assigned this Oct 14, 2023
For our current Mutex specs, we can just try to see if a ThreadError is
thrown. This should be changed to something more sensible. The upstream
specs use a watcher Thread, but that won't work for us.
We can probably use the Fiber scheduler to catch callbacks.
@herwinw
Copy link
Member Author

herwinw commented Nov 30, 2023

I'm removing this one, in favour of #1541

@herwinw herwinw closed this Nov 30, 2023
@herwinw herwinw deleted the mutex branch November 30, 2023 06:30
@seven1m
Copy link
Member

seven1m commented Nov 30, 2023

Dang I completely forgot about this existing PR. 🤦‍♂️ Sorry!

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

Successfully merging this pull request may close these issues.

2 participants