System::Threading::WaitHandle::WaitAny metodo

WaitHandle::WaitAny(const System::ArrayPtr<System::SharedPtr<WaitHandle>>&) method

Attende che uno qualsiasi degli handle venga attivato.

static int System::Threading::WaitHandle::WaitAny(const System::ArrayPtr<System::SharedPtr<WaitHandle>> &waitHandles)
ParametroTipoDescrizione
waitHandlesconst System::ArrayPtr<System::SharedPtr<WaitHandle>>&Handle da attendere.

ReturnValue

Vero quando ogni elemento in waitHandles ha ricevuto un segnale; altrimenti il metodo non ritorna mai.

Vedi anche

WaitHandle::WaitAny(const System::ArrayPtr<System::SharedPtr<WaitHandle>>&, int) method

Attende che uno qualsiasi degli handle venga attivato.

static int System::Threading::WaitHandle::WaitAny(const System::ArrayPtr<System::SharedPtr<WaitHandle>> &waitHandles, int millisecondsTimeout)
ParametroTipoDescrizione
waitHandlesconst System::ArrayPtr<System::SharedPtr<WaitHandle>>&Handle da attendere.
millisecondsTimeoutintTimeout da attendere, in millisecondi; -1 indica attesa infinita, 0 indica verifica e ritorno, i valori positivi sono timeout.

ReturnValue

Vero se qualche handle è stato attivato, falso se il timeout è scaduto.

Vedi anche

WaitHandle::WaitAny(const System::ArrayPtr<System::SharedPtr<WaitHandle>>&, TimeSpan) method

Attende che uno qualsiasi degli handle venga attivato.

static int System::Threading::WaitHandle::WaitAny(const System::ArrayPtr<System::SharedPtr<WaitHandle>> &waitHandles, TimeSpan timeout)
ParametroTipoDescrizione
waitHandlesconst System::ArrayPtr<System::SharedPtr<WaitHandle>>&Handle da attendere.
timeoutTimeSpanUn System::TimeSpan che rappresenta il numero di millisecondi da attendere, oppure un System::TimeSpan che rappresenta -1 millisecondi per attendere indefinitamente.

ReturnValue

Vero se qualche handle è stato attivato, falso se il timeout è scaduto.

Vedi anche