Вниз
Скачать: CL | DM;

WaitForMultipleObjects для произвольного количества объектов.   Найти похожие ветки 

← →
Riply ©   (2007-03-20 00:56) [0]

Здравствуйте !
Допустим, у нас есть n > MAXIMUM_WAIT_OBJECTS объектов.
Надо организовать ожидание срабатывания хотя бы одного из них.
Как это лучше сделать ?
Мне, ничего, кроме организации новой нити для каждых «следующих» 64,
в голову не приходит :(


← →
Джо ©   (2007-03-20 01:09) [1]

To wait on more than MAXIMUM_WAIT_OBJECTS handles, use one of the following methods:

Create a thread to wait on MAXIMUM_WAIT_OBJECTS handles, then wait on that thread plus the other handles. Use this technique to break the handles into groups of MAXIMUM_WAIT_OBJECTS.
Call RegisterWaitForSingleObject to wait on each handle. A wait thread from the thread pool waits on MAXIMUM_WAIT_OBJECTS registered objects and assigns a worker thread after the object is signaled or the time-out interval expires.

(c) MSDN.


← →
Riply ©   (2007-03-20 01:26) [2]

>[1] Джо ©   (20.03.07 01:09)
Спасибо.
MSDN - у, тоже, спасибо :)



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.032 c
15-1173732577
Неюрист
2007-03-12 23:49
2007.04.08
Заполнить бланк лицензии на программный продукт


2-1173879026
Vladisllav
2007-03-14 16:30
2007.04.08
Связь двух таблиц Ib в Delphi


4-1163939380
SerMax
2006-11-19 15:29
2007.04.08
Key_Hook и зажатие клавиши


15-1173605122
php-er
2007-03-11 12:25
2007.04.08
не присваеваится значение переменной.


15-1173709952
Prohodil Mimo
2007-03-12 17:32
2007.04.08
If ... then : Begin End VS Exit;




   Наверх