You can consider a scenario where you create a Thread to perform some
function. You expect your thread to complete that work in some MAX_TIME.
Then you can create the thread and then use WaitForMultipleObject to wait
till your thread exits. As argument you would use the HANDLE of the thread.
return = WaitForMultipleObject(THREAD_HANDLE,MAX_TIME),//Check MSDN
for exact function signature.
It will be a blocking call, and will return in either if your thread has
finished doing its work( inthat case THREAD_HANDLE got signeled), ot timeout
has occured.
>What is meant by object in signaled state?
>
> All native objects can be in either a "signaled" or "unsignaled"
> state. What this means exactly depends on the object types; for thread
> objects, the signaled state means that the thread has terminated
> (which happens explicitly when the ExitThread or TerminateThread
> function is called, or happens implicitly as soon as the thread
> function returns or the process that owns the thread terminates). When
> a thread is created, it is set to the unsignaled state.
>
> Pls try finding out more in google....
>
> cheers,
> Sunil Nair.
> */agilegeek <[EMAIL PROTECTED]>/* wrote:
>
> Hi Sunil,
>
> What is meant by object in signaled state?
>
> -Abhishek
>
>
>
> Sunil Nair wrote:
>> <snip taken frm MSDN>
>> This is what it says abut......
>>
>> */The *WaitForMultipleObjectsEx* function returns when one of the
>> following occurs: /*
>>
>> * */Either any one or all of the specified objects are in the
>> signaled state. /*
>> * */An I/O completion routine or asynchronous procedure call
>> (APC) is queued to the thread. /*
>> * */The time-out interval elapses. /*
>>
>>
>> */*/Get the help of MSDN......or frm google...../*/*
>>
>> */[EMAIL PROTECTED]>/* wrote:
>>
>> On 12/11/06, *agilegeek* <[EMAIL PROTECTED]
>> <mailto:[EMAIL PROTECTED]>> wrote:
>>
>> Hi,
>>
>> What does this function do
>>
>> *WaitForMultipleObjectsEx()*
>>
>>
>> At a guess, it waits for multiple objects. To confirm this,
>> you could always look at the documentation that comes with
>> your compiler, or perhaps use Google for your web searches
>> instead of C-Prog.
>>
>>
>>
>>
>>
>>
>> --
>> PJH
>>
>> #713059 +(1255)- [X]
>>
>> <SaintAlvus> Does the name Doctor Pavlov ring a bell?
>>
>>
>> Send instant messages to your online friends
>> http://uk.messenger.yahoo.com
>
>
> Send instant messages to your online friends
> http://uk.messenger.yahoo.com
>
>
To unsubscribe, send a blank message to <mailto:
[EMAIL PROTECTED]>.
Yahoo! Groups Links
--
Regards
Sumit Chawla ("eNetra : Hail the Invention")
"Computers are useless. They can only give you answers.":Pablo Picasso