Mail Archives: djgpp/2000/05/01/17:15:45
Hello.
"Alexei A. Frounze" wrote:
>
> Eli Zaretskii wrote:
> > __dpmi_yield is not for task switching, it's for releasing the current
> > time slice allotted by Windows (or any other multi-tasking scheduler).
[snip]
> Do you bother about that while you're programming? I.e. do you write a
> custom keyboard read function that calls that thing?
FYI libsocket uses __dpmi_yield() a fair amount. It made a significant
difference to libsocket's behaviour when I was testing its Winsock 1
support with internal select() operations with time-outs. Without the
__dpmi_yield() code, my computer was almost unusable, because the DOS box
was hogging all the processor time in a loop in the internal select
operation. libsocket calls WSOCK.VXD a lot, which must be an expensive
operation in processor time.
If you're waiting for some status bit to change in your loop, what's the
point of hogging the processor?
Bye,
--
Richard Dawe
richdawe AT bigfoot DOT com ICQ 47595498 http://www.bigfoot.com/~richdawe/
- Raw text -