
At 12:59 AM 3/24/2004, John Torjo wrote:
David Abrahams wrote:
"Carl Daniel" <cpdaniel@pacbell.net> writes:
Adal Chiriliuc wrote:
Wasn't event usage discouraged because it is unsafe?
That was semaphores.
IIRC Windows Events have safety problems too.
I didn't know about that. Could you give a link or something, where such problems are explained? (right now I'm working no an app., and it uses a lot of Windows Events)
Semaphores were originally invented to overcome the problems of events. But Semaphores were only somewhat better, and so condition variables and various patterns were developed. Dijkstra's 1965 paper "Cooperating Sequential Processes" explained the problems associated with events and any other constructs that depend on processing speed assumptions to work correctly. That paper was recently reprinted in the book "The Origin of Concurrent Programming", Per Brinch Hansen, editor, 2002. Dijkstra died last year. Brinch Hansen and Hoare, the other giants of concurrent programming, are still active in computer science. Hoare has been knighted, the only programmer that I know of to gain that honor. Brinch Hansen has written some interesting recent papers pointing out problems with Java multi-tasking semantics. --Beman