home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!snorkelwacker.mit.edu!vaxeline.ftp.com!clennox
- From: clennox@vaxeline.ftp.com (Systems Anarchist)
- Subject: Re: Yielding a Timeslice
- Message-ID: <1992Aug20.194114.14270@vaxeline.ftp.com>
- Organization: FTP Software, Inc., Wakefield, MA
- References: <1992Aug19.184837.24219@news.weeg.uiowa.edu>
- Date: Thu, 20 Aug 1992 19:41:14 GMT
- Lines: 10
-
- In article <1992Aug19.184837.24219@news.weeg.uiowa.edu> schwaigr@news.weeg.uiowa.edu (Jim Schwaiger) writes:
- >Is there a standard (or commonly accepted) way for a program to yield
- >its timeslice? I have a program which checks on a condition in shared
- >memory and would like to sleep (for less than 1 second) if that condition
- >is not met, rather than waiting in the "hot" loop.
-
- Try sleep(0).
-
- --
- %SYSTEM-F-ANARCHISM, the operating system has been overthrown
-