Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!f.word.cs.cmu.edu!eht From: eht@f.word.cs.cmu.edu (Eric Thayer) Newsgroups: comp.sys.next Subject: multithreaded applications Message-ID: <7332@pt.cs.cmu.edu> Date: 14 Dec 89 00:26:54 GMT Reply-To: eht@f.word.cs.cmu.edu (Eric Thayer) Organization: Carnegie-Mellon University, CS/RI Lines: 18 Keywords: Someone wanted to know about multithreaded applications a while back so... One way that I found to deal with interactions between the threads and the Application itself is to define a set of events that the threads will use to communicate with the Application (see NX_APPDEFINED, and applicationDefined: in the Application class). Then your thread can inform the Application of things it should do via the event loop. This gets around the problem of having the thread hang/crash the event loop or botch up the display. If anyone is interested I have a simple piece of code which demonstrates queuing up application defined events from a thread. Hope this helps someone out there. I wish I had thought of this soln sooner, but... -- Eric H. Thayer School of Computer Science, Carnegie Mellon (412) 268-7679 5000 Forbes Ave, Pittsburgh, PA 15213