Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Waits for all of the specified agents to complete their tasks.
_CRTIMP2 static void __cdecl wait_for_all(
size_t _Count,
__in_ecount(_Count) agent ** _PAgents,
__out_ecount_opt(_Count) agent_status * _PStatus = NULL,
unsigned int _Timeout = COOPERATIVE_TIMEOUT_INFINITE
);
Parameters
_Count
The number of agent pointers present in the array _PAgents._PAgents
An array of pointers to the agents to wait for._PStatus
A pointer to an array of agent statuses. Each status value will represent the status of the corresponding agent when the method returns._Timeout
The maximum time for which to wait, in milliseconds.
Remarks
An agent task is completed when the agent enters the agent_canceled or agent_done states.
If the parameter _Timeout has a value other than the constant COOPERATIVE_TIMEOUT_INFINITE, the exception operation_timed_out is thrown if the specified amount of time expires before the agent has completed its task.
Requirements
Header: agents.h
Namespace: Concurrency