-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 Reentrantlock #6373
Add Reentrantlock #6373
Conversation
@adamgfraser hello 👋 if you're happy with that I can port to the 2.x branch afterwards. |
@regiskuckaertz Will take a look today! |
This looks good. I think the big question here is whether we want this to be its own bespoke data structure or a type alias for the existing |
Yeah I thought about that, I wasn't really sure what to do tbh, but happy to do it that way instead. Is it still the intent to match the JDK API or not? |
I think if we did that we definitely wouldn't match the Java API. My initial thought would have been to just alias |
I'm tempted to say on the surface the datatypes in zio.concurrent currently are very close to the jdk, and that using STM under the hood feels like an implementation detail. Can we go that way and see how it pans out? |
@adamgfraser ping 😇 |
@regiskuckaertz Sure! |
* Add ReentrantLock * Release interrupted fibers * Fix for 2.12 * Mark as flaky * Can't always nudge the fiber the right way * Refactor test Co-authored-by: Regis Kuckaertz <regiskuckaertz@users.noreply.github.com>
* Add Reentrantlock (#6373) * Add ReentrantLock * Release interrupted fibers * Fix for 2.12 * Mark as flaky * Can't always nudge the fiber the right way * Refactor test Co-authored-by: Regis Kuckaertz <regiskuckaertz@users.noreply.github.com> * Rewrite with 2.0 idioms Co-authored-by: Regis Kuckaertz <regiskuckaertz@users.noreply.github.com>
Closes #5807
Is this still relevant? I tried to stick to the java api as much as possible, though I think interruption is so central to zio that it did not make much sense not to handle it by default. Let me know what you think.