mirror of
https://github.com/rdmsr/zag.git
synced 2026-11-01 23:58:21 +00:00
ps+ke: add thread reaping
This commit is contained in:
@@ -41,6 +41,8 @@ pub const HandoffList = struct {
|
||||
}
|
||||
|
||||
/// Pop the entire list and process it.
|
||||
/// The callback takes the object pointer as its first parameter
|
||||
/// and ctx as its second.
|
||||
pub fn process(self: *Self, callback: *const fn (*anyopaque, ?*anyopaque) void, ctx: ?*anyopaque) void {
|
||||
while (true) {
|
||||
const head = self.head.swap(processing_tag, .acquire);
|
||||
|
||||
Reference in New Issue
Block a user