🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: usleep and efficiency

#393
From: Chris Lloyd
Date: Sat, 01 Aug 1992 18:17
18 lines
1232 bytes
In article <1992Jul31.175146.23460@svcdudes.com> moose@svcdudes.com writes:
> However, there  
>is a wonderful example which uses mach ports timing out to implement a  
>non-signal dependant sleep.  I forget where, but it's in  
>NeXTDevelopers/Examples.

Timeout on mach message send/recv (as used by SortingInAction) seemed to be
the way to do this, but I've started using:

thread_switch(THREAD_NULL,SWITCH_OPTION_WAIT,timeout);

Where timeout is in milliseconds. No ugly port allocate/deallocate and
it does the trick.

la la la,
-- 
:: Christopher Lloyd :: a74k110@titan.ucc.umass.edu :: Yrrid, Inc. ::
:: AAAAAAAAAAAAAAAAAAAIIIIIIIIIIIIIIIIIIIIIIIGGGGGGGGHHHHH!!!!!!!! ::
Technical Details
Message-ID: <1992Aug1.181734.2495@nic.umass.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!nic.umass.edu!titan.ucc.umass.edu!a74k110
References: <2A778A16.26787@noiro.acs.uci.edu> <1992Jul31.175146.23460@svcdudes.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!nic.umass.edu!titan.ucc.umass.edu!a74k110
From: a74k110@titan.ucc.umass.edu (Chris Lloyd)
Subject: Re: usleep and efficiency
Message-ID: <1992Aug1.181734.2495@nic.umass.edu>
Sender: usenet@nic.umass.edu (USENET News System)
Nntp-Posting-Host: titan.ucc.umass.edu
Organization: University of Massachusetts, Amherst
References: <2A778A16.26787@noiro.acs.uci.edu> <1992Jul31.175146.23460@svcdudes.com>
Distribution: na
Date: Sat, 1 Aug 1992 18:17:34 GMT
Lines: 18