diff options
| author | emekoi <emekankurumeh@outlook.com> | 2018-11-18 01:15:24 -0600 |
|---|---|---|
| committer | emekoi <emekankurumeh@outlook.com> | 2019-01-11 09:56:33 -0600 |
| commit | aaae2f5705a2dee3a12ea49c1094c217a73bb897 (patch) | |
| tree | 3798fc5b07bef79a3168a366a3d109ae271cda14 /std/mutex.zig | |
| parent | 99f44219bcc0c8c496a4a5ebd5d8be465cb71c07 (diff) | |
| download | zig-aaae2f5705a2dee3a12ea49c1094c217a73bb897.tar.gz zig-aaae2f5705a2dee3a12ea49c1094c217a73bb897.zip | |
switching from EnterCriticalSection to TryEnterCriticalSection
Diffstat (limited to 'std/mutex.zig')
| -rw-r--r-- | std/mutex.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/std/mutex.zig b/std/mutex.zig index 125a763479..c0b5d3b002 100644 --- a/std/mutex.zig +++ b/std/mutex.zig @@ -96,7 +96,7 @@ const MutexWindows = struct { pub fn acquire(self: *Mutex) Held { self.initOsData(); - windows.EnterCriticalSection(&self.lock); + while (windows.TryEnterCriticalSection(&self.lock) == 0) {} return Held { .mutex = self }; } }; |
