diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-01-02 20:29:55 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-01-02 20:29:55 -0500 |
| commit | b025cf269d2e07e179be4a0e34d936862dc640c2 (patch) | |
| tree | 6bcce81829436a08dbe4f0101044c0cd07811525 /stdlib/threads.c | |
| parent | 500e4e1bd74b45476c4df0f4f9da72fbada9bb18 (diff) | |
Use `holding` blocks for mutexed data instead of lambdas
Diffstat (limited to 'stdlib/threads.c')
| -rw-r--r-- | stdlib/threads.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |
