Обсуждение: Re: Win32 signal code - first try

Поиск
Список
Период
Сортировка

Re: Win32 signal code - first try

От
"Merlin Moncure"
Дата:
> 3. you are absolutely certain that
> __pg_poll_signals() +
> EnterCriticalSection +
> memset +
> if... +
> LeaveCriticalSection +
> if...
>
> is more efficient than a single call to WaitForSingleObjectEx() with 0
> timeout?

Some crude tests show that my 1 GHz P3 can execute about 1.2 million
calls to WaitForSingleObjectEx() in 1 second.  However, this is about
3.5 times slower than a quick mock up of your polling function I put
together.  Either approach, though, is pretty darn quick :).  Unlike
SleepEx(), WFSO does not stall the thread.

Merlin