- Use @pool_init() to set up a temp pool on a thread. Only the main thread has implicit temp pool setup.

- `tmem` is now a variable.
This commit is contained in:
Christoffer Lerno
2025-03-21 17:08:53 +01:00
parent fab00f21a6
commit a03d821602
41 changed files with 208 additions and 167 deletions

View File

@@ -72,7 +72,11 @@ macro void OnceFlag.call(&flag, OnceFn func) => NativeOnceFlag.call_once((Native
macro void yield() => os::native_thread_yield();
macro Thread current() => (Thread)os::native_thread_current();
macro void exit(int result) => os::native_thread_exit(result);
macro void exit(int result)
{
allocator::destroy_temp_allocators();
os::native_thread_exit(result);
}
macro void? sleep(Duration d) @maydiscard => os::native_sleep_nano(d.to_nano());
macro void? sleep_ms(ulong ms) @maydiscard => sleep(time::ms(ms));
macro void? sleep_ns(NanoDuration ns) @maydiscard => os::native_sleep_nano(ns);