|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-09-25 07:02:56
From: <williamkempf_at_[hidden]>
> As for changing the name... one name change request that's been made
> several times that I've ignored I'd like to address one last time.
> The notify_one() and notify_all() methods on condition are more
> traditionally known as signal() and broadcast() respectively. I was
> persuaded to change them at one point, but I'm feeling like this was
> a mistake. I'm leaning towards changing them but I'll need to do so
> in the next day or two, so one final chance to argue this one.
A case for signal/broadcast:
* Q: Why? A: POSIX.
* Q: notify_* readable by non-experts, signal/broadcast not?
A:
It is a feature that signal/broadcast are unreadable by non-experts. This
causes an immediate task-switch to documentation reading mode.
notify_one/notify_all are readable enough that a non-expert would be tempted
to _not_ check what their precise semantics are - and get burned.
unblock_one_waiting_thread/unblock_all_waiting_threads are the
self-descriptive, no-documentation-necessary alternatives, but I don't see
anybody lobbying for them. ;-)
-- Peter Dimov Multi Media Ltd.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk