Updates and fixes to Mutex (#933)

Updating Mutex to have specific types: TimedMutex, RecursiveMutex, TimedRecursiveMutex. Fixes to the win32 implementation.
This commit is contained in:
Christoffer Lerno
2023-08-16 15:45:49 +02:00
committed by GitHub
parent 8a4337e819
commit e694d60f23
5 changed files with 34 additions and 10 deletions

View File

@@ -21,7 +21,7 @@ fn void! testrun_mutex() @test
{
Thread[100] ts;
a = 0;
m.init(thread::MUTEX_PLAIN)!;
m.init()!;
foreach (&t : ts)
{
t.create(fn int(void* arg) {
@@ -60,7 +60,7 @@ fn void! testrun_mutex_try() @test
fn void! testrun_mutex_timeout() @test
{
Mutex m;
TimedMutex m;
m.init()!;
m.lock()!;
if (try m.lock_timeout(100))