1. Euphoria's "sleep(0)" call

Hello there,

In misc.e, sleep(0) is wrapped to return if x is zero (0).
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) will
it yield control like the Win API call or no?


Take care,
Al

And, good luck with your Euphoria programming!

My bumper sticker: "I brake for LED's"

new topic     » topic index » view message » categorize

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

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 message » categorize

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

Juergen Luethje wrote:
> 
> 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:
> 
> }}}
<eucode>
> 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
> </eucode>
{{{

> 
> > will it yield control like the Win API call or no?
> 
> I don't know.
> 
> Regards,
>    Juergen
> 
> 

Oh yes, v2.5 has the update.  I was looking at v2.4's misc.e  :)


Take care,
Al

And, good luck with your Euphoria programming!

My bumper sticker: "I brake for LED's"

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu