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: Re: threads in Objective-C Message-ID: <7283@pt.cs.cmu.edu> Date: 8 Dec 89 21:15:32 GMT References: <299@kgw2.UUCP> Organization: Carnegie-Mellon University, CS/RI Lines: 15 In article <299@kgw2.UUCP> dennisg@kgw2.UUCP (Dennis Glatting) writes: >does anyone know the restrictions or implications of using threads >in a Objective-C app? i use multiple threads in my C apps on the NeXT. >is multi-threaded O-C apps recommended? > You should not have more than one thread causing updates to the display. We had difficulties with this in our demo software. One thread was updating one field and during that update, another thread caused another field to be updated. This totally confused the state of the display code. We used a mutex to serialize access to the display code and things have worked ok after that. -- Eric H. Thayer School of Computer Science, Carnegie Mellon (412) 268-7679 5000 Forbes Ave, Pittsburgh, PA 15213