[Prev][Next][Index][Thread]
Re: Continuations?
The GUSI Pthreads library for Classic MacOS (used in MacPerl) switches threads when you call socket routines as well as yield(). This works quite well apparently.
MacOS X has PThreads, but I think Carbon still isn't threadsafe, so you can only call graphics routines from one thread. This is a common restriction even in languages like Java, where Swing is explicitly not threadsafe.
Patrick Beard's original Mindy Toolbox library had thread-safety routines for QuickDraw, as Mindy has multiple threading support (in its VM).
Bear in mind that WaitNextEvent() is effectively a global or application-level yield(), you don't have to wait very long if you don't want to.
- Rob.
On Friday, November 10, 2000, at 09:45 AM, Bruce Hoult wrote:
> I'm talking about calling yield()
> in a user-mode threads library, which switches you to a different thread
> *within* your application.