mirror of
https://github.com/rdmsr/zag.git
synced 2026-10-27 13:58:20 +00:00
ex: clear workqueue enqueued field before running the function
This commit is contained in:
@@ -111,9 +111,8 @@ fn work_loop(p: ?*anyopaque) void {
|
||||
const item = pool.queue.remove();
|
||||
const work: *WorkItem = @fieldParentPtr("link", item);
|
||||
|
||||
work.func(work.arg);
|
||||
|
||||
work.enqueued.store(false, .release);
|
||||
work.func(work.arg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user