Re: Euphoria's "sleep(0)" call

new topic     » goto parent     » topic index » view thread      » older message » newer message

Al Getz wrote:

> In misc.e, sleep(0) is wrapped to return if x is zero (0).

I think that was the case in Eu versions prior to 2.5.

> In WinAPI, sleep(0) yields control to another process.
> What im wondering is, if we change the code to allow the
> 'machine' function to allow the call even with zero (0)

This is already the case in Eu 2.5. In 'misc.e' it reads:

global procedure sleep(integer t)
-- go to sleep for t seconds
-- allowing (on WIN32 and Linux) other processes to run
    if t >= 0 then
	machine_proc(M_SLEEP, t)
    end if
end procedure


> will it yield control like the Win API call or no?

I don't know.

Regards,
   Juergen

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu