diff options
| author | Martin Ridgers <[email protected]> | 2021-11-26 15:14:00 +0100 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2021-11-26 15:17:25 +0100 |
| commit | ba67259acb76741f2d690eb9e05a311c086262cf (patch) | |
| tree | 667e63d1fbdc8300ce055596016485b5b8ae99d3 /zencore/thread.cpp | |
| parent | Wait on an event instead of using sleep() (diff) | |
| download | zen-ba67259acb76741f2d690eb9e05a311c086262cf.tar.xz zen-ba67259acb76741f2d690eb9e05a311c086262cf.zip | |
ProcessHandle::Wait() wasn't waiting indefinitely with a <0 timeout
Diffstat (limited to 'zencore/thread.cpp')
| -rw-r--r-- | zencore/thread.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zencore/thread.cpp b/zencore/thread.cpp index ee62b5248..0f2dc7181 100644 --- a/zencore/thread.cpp +++ b/zencore/thread.cpp @@ -585,7 +585,7 @@ ProcessHandle::Wait(int TimeoutMs) timespec SleepTime = { 0, SleepMs * 1000 * 1000 }; for (int i = 0; ; i += SleepMs) { - if (i >= TimeoutMs) + if (TimeoutMs >= 0 && i >= TimeoutMs) { return false; } |