home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / programm / 4390 < prev    next >
Encoding:
Text File  |  1992-08-20  |  851 b   |  21 lines

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