michael@ewa.cs.ucla.edu (michael gersten) (03/26/91)
Is the Cthreads package supported on Next? If so, which of the implementations -- true threads, multiple processes, or co-routining? I'm asking because as I understand it, all three versions rely on the external pager of Mach, which isn't working on NeXT. Michael
mikel@Apple.COM (Mikel Evins) (03/27/91)
In article <michael.669967720@ewa> michael@ewa.cs.ucla.edu (michael gersten) writes: > >Is the Cthreads package supported on Next? Yes. I've used it myself. >If so, >which of the implementations -- true threads, >multiple processes, or co-routining? True threads, if I'm not mistaken.
eht@cs.cmu.edu (Eric Thayer) (03/28/91)
In article <50814@apple.Apple.COM> mikel@Apple.COM (Mikel Evins) writes: > In article <michael.669967720@ewa> michael@ewa.cs.ucla.edu (michael gersten) writes: > > > >Is the Cthreads package supported on Next? > > Yes. I've used it myself. > Cthreads does work (and they are real threads), but you have to take care if multiple threads wish to change the state of *kit objects (especially the objects that have graphical representations). It is necessary to generate an event which is then processed by the Application's event loop. There are various ways to generate an event from a thread (see DPSAddPort(), DPSAddFD(), Speaker). With Speaker implementations you should be careful that multiple threads are not sharing the same speaker object (i.e. if every thread just uses [NXApp appSpeaker] you may find yourself toasted). ..eric