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

Consider adding Fiber.self to get the id of current fiber #2

Open
polytypic opened this issue Jul 31, 2023 · 0 comments
Open

Consider adding Fiber.self to get the id of current fiber #2

polytypic opened this issue Jul 31, 2023 · 0 comments

Comments

@polytypic
Copy link
Owner

polytypic commented Jul 31, 2023

A recursive mutex implementation (see here), for example, might want to use the id of a fiber.

A non-recursive mutex implementation could use such an id to detect when a mutex is unlocked by a different fiber than what locked it.

Another use case would be to signal errors in case of recursive forcing of a concurrency-safe implementation of lazy.

@polytypic polytypic changed the title Consider addng Fiber.self to get the id of current fiber Consider adding Fiber.self to get the id of current fiber Aug 24, 2023
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

1 participant