Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!uc!noc.MR.NET!gacvx2.gac.edu!scott From: scott@next-8.gac.edu (Scott Hess) Newsgroups: comp.unix.questions Subject: Standard way to yield cpu Message-ID: Date: 26 Nov 90 04:34:09 GMT Organization: Gustavus Adolphus College Lines: 22 Nntp-Posting-Host: next-8.gac.edu Is there any method under standard Unix to yield up the CPU so that other tasks can run for a time? I speculate that a call to sleep() with 0 timeout _might_ do it, but someone may just have optimized that part . . . I could do testing, but it would not be very conclusive, as I'd have no way of telling whether another task actually ran. OS: Unix over Mach on a NeXT. BSD4.3 to the rest of the world. Before you flame away, I am _not_ going to be doing polling. Well, not like you think. I'm using a library built over select() to catch incoming data on a pty line. It would be advantageous to catch more data from an emacs on the other end (it's a terminal emulator) before doing redraws. Of course, I'd not wait for something which can blast data (like cat), but in the case of emacs, blast is not exactly the word to use . . . (don't worry, vi does no better). -- scott hess scott@gac.edu Independent NeXT Developer (Stuart) GAC Undergrad (Horrid. Simply Horrid. I mean the work!)