ps+ke: add thread reaping

This commit is contained in:
Loïc Grégoire
2026-06-29 17:12:46 -04:00
parent bf08a9fef2
commit a9c933114d
10 changed files with 140 additions and 46 deletions
+2
View File
@@ -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);