in reply to Re^2: multiple infinitive loops
in thread multiple infinitive loops
I don't know anything about these scripting/locator things, but a quick look at the MSDN Library shows that NextEvent accepts a timeout. Therefore, a simple solution is:
use constants TIMEOUT => 50; use constants wbemErrTimedOut => 0x80043001; while (1) { $o1 = $h1->NextEvent(TIMEOUT); ProcessEvent1($h1, $o1) if ($o1 != wbemErrTimedOut); $o2 = $h2->NextEvent(TIMEOUT); ProcessEvent2($h2, $o2) if ($o2 != wbemErrTimedOut); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: multiple infinitive loops
by ozkaa (Acolyte) on Oct 06, 2004 at 17:10 UTC | |
by ikegami (Patriarch) on Oct 06, 2004 at 17:19 UTC |