semaphor

Hello

"Bug", the next one: :slight_smile:

m=Mutex.new; m.synchronize { m.sleep }
fatal: No live threads left. Deadlock?

When doing it the first time (main thread), I get this error. (Ruby 2.6
- is it the same with 3.x?)

When doing it again (also with a new m!), then I don't get this failure:
m2=Mutex.new; m2.synchronize { m.sleep } # no error.

Which case is better (how to sleep for an event in the main-thread?)

In any case we should get the same behaviour when starting it the first
time, or later again...

Opti

Please, the place to discuss bugs and feature requests is
https://bugs.ruby-lang.org/. People there have the authority to say this is
a bug or not, or this feature request is accepted or not.