#winit #windowing #thread #platform #check

is_main_thread

A simply tool to check if current thread is the main one

1 unstable release

0.1.0 Apr 1, 2020

#732 in Concurrency

Apache-2.0

7KB
118 lines

is_main_thread is a bare bones library to simply check if the current thread is the main thread is the most platform independent way possible

The initial code for these checks was taken from the winit crate collected here for the main purpose of allowing winit to be an optional dependency but also have consistent behaviour should you allow another windowing library which might expect you to use the main thread but either way doesn't enforce it like winit.

Dependencies

~205KB