[Tutor] Re: how do I sleep?
Lloyd Kvam
lkvam@venix.com
Thu, 29 Nov 2001 09:28:38 -0500
Since I have also found that VB programs (even on NT) require an occassional
call to DoEvents, it is probably a defect in the VB runtime. So far, I have
not experienced a need for this kind of function in my Python code.
alan.gauld@bt.com wrote:
>>I'm not aware of anything like that (in Python or C) other than
>>"sleep". If you sleep, then your process isn't doing anything and the
>>kernel will (should!) give the CPU to another process that is doing
>>something. That's what you're looking for, right?
>>
>
> Kind of. What he's looking for is a call that tells the OS to
> process any other active processes but if there aren't any come
> right back here. In other words only pause if you need to.
> Sleep pauses regardless.
>
> This is only necessary on coopoerative multitasking environments
> like Win3x and Win 9x and early OS/2 and Mac. On Unix, NT etc this
> should not be needed as the kernewl will switch processes
> pre-emptively. (Win 9x will do so too provided the program is
> 100% Win32 clean, unfortunately few are which is why so many
> programs still hang for long periods in Win9x...)
>
> Alan g.
>
> _______________________________________________
> Tutor maillist - Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>
--
Lloyd Kvam
Venix Corp.
1 Court Street, Suite 378
Lebanon, NH 03766-1358
voice:
603-443-6155
fax:
801-459-9582