digitalmars.D.bugs - [Issue 23332] New: core.sync.condition notify methods should be nogc
- d-bugmail puremagic.com (23/23) Sep 12 2022 https://issues.dlang.org/show_bug.cgi?id=23332
https://issues.dlang.org/show_bug.cgi?id=23332 Issue ID: 23332 Summary: core.sync.condition notify methods should be nogc Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: enhancement Priority: P1 Component: druntime Assignee: nobody puremagic.com Reporter: garrett damore.org It would be desirable to be able to notify a condition from nogc code. Underneath, neither Windows nor POSIX require an allocation. However, the D implementation of this library attempts to handle any error that comes from the pthread_cond_signal or pthread_cond_broadcast calls and turns them into a thrown exceeption. In general, these calls cannot fail on any system, unless they are provided with invalid inputs. Given that, it would be IMO perfectly reasonable to turn this into a runtime error condition (e.g. via an assert or following the method done for sync.mutex.Mutex.) --
Sep 12 2022