fn detach(self: Impl) void
self: Impl
632 633 634 635 636 637 638 639
fn detach(self: Impl) void { windows.CloseHandle(self.thread.thread_handle); switch (self.thread.completion.swap(.detached, .seq_cst)) { .running => {}, .completed => self.thread.free(), .detached => unreachable, } }