From b025cf269d2e07e179be4a0e34d936862dc640c2 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 2 Jan 2025 20:29:55 -0500 Subject: Use `holding` blocks for mutexed data instead of lambdas --- stdlib/threads.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stdlib/threads.c') diff --git a/stdlib/threads.c b/stdlib/threads.c index c5690111..efd23546 100644 --- a/stdlib/threads.c +++ b/stdlib/threads.c @@ -34,8 +34,8 @@ static void *run_thread(Closure_t *closure) public Thread_t Thread$new(Closure_t fn) { Thread_t thread = new(pthread_t); - Closure_t *doop = new(Closure_t, .fn=fn.fn, .userdata=fn.userdata); - pthread_create(thread, NULL, (void*)run_thread, doop); + Closure_t *closure = new(Closure_t, .fn=fn.fn, .userdata=fn.userdata); + pthread_create(thread, NULL, (void*)run_thread, closure); return thread; } -- cgit v1.2.3