io icon indicating copy to clipboard operation
io copied to clipboard

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

Open polytypic opened this issue 2 years ago • 0 comments

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 avatar Jul 31 '23 07:07 polytypic