🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #134

Re: usleep and sound, signals and threads

#134
From: felix.lugo
Date: Wed, 04 Nov 1992 01:17
26 lines
1096 bytes
In article <5724@rosie.NeXT.COM> sam_s@NeXT.com writes:
| 
| The solution is to pick some waiting method that doesn't use signals; for  
| example waiting on a mach port.
| 
| One easy way to do this is to wait for an event that will never be received  
| with an appropriate timeout.  For example:
| 
| 	NXEvent dummyEvent;
| 
| 	[NXApp peekNextEvent:0 
| 		into:&dummyEvent 
| 		waitFor:timeout
| 		threshold: NX_MODALRESPTHRESHOLD];
| 
| Maybe this will keep someone from tearing one's hair out.
| 
| -sam
| 
| --
| Opinions expressed herein are not those of my employer.  They're not even
| mine.  There is water at the bottom of the ocean.  Hi Mom!

	What's wrong with using good'ol select()?

--Felix
Technical Details
Message-ID: <1992Nov4.011720.12191@cbnewsl.cb.att.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!walter!att-out!cbfsb!cbnews!cbnewsm!cbnewsl!coco
References: <5724@rosie.NeXT.COM>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!walter!att-out!cbfsb!cbnews!cbnewsm!cbnewsl!coco
From: coco@cbnewsl.cb.att.com (felix.lugo)
Subject: Re: usleep and sound, signals and threads
Organization: AT&T
Date: Wed, 4 Nov 1992 01:17:20 GMT
Message-ID: <1992Nov4.011720.12191@cbnewsl.cb.att.com>
References: <5724@rosie.NeXT.COM>
Lines: 26