crystal-lang / crystal

The Crystal Programming Language
https://crystal-lang.org
Apache License 2.0
19.21k stars 1.61k forks source link

Add `Crystal::System::Thread.current_thread?`, `#scheduler?` #14660

Closed ysbaddaden closed 1 month ago

ysbaddaden commented 1 month ago

The internal runtime may need to access the current thread and scheduler before they're actually defined and without lazily defining them (e.g. tracing).

Extracted from #14659