Sleep

Discussion about the ZBasic language including the System Library. If you're not sure where to post your message, do it here. However, do not make test posts here; that's the purpose of the Sandbox.
Post Reply
rich
Posts: 81
Joined: 19 November 2015, 12:23 PM

Sleep

Post by rich »

I see in AN221 that sleep(0) is called after a semaphore is released. Is that to give another task a chance to run?

If so does it return immediately if there is no task to run.

Thanks
Richard
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: Sleep

Post by dkinzer »

rich wrote:Is that to give another task a chance to run?
If so does it return immediately if there is no task to run.
Yes to both.
- Don Kinzer
Post Reply