facebookexperimental / libunifex

Unified Executors
Other
1.48k stars 189 forks source link

io_uring_context should use std::atomic<std:: thread::id> instead of thread_local to determine if currently on the I/O thread #353

Open lewissbaker opened 3 years ago

lewissbaker commented 3 years ago

This should avoid the use of thread_local but should also allow us to detect whether a context's run() method is executing regardless of whether there is a nested io_uring_context::run() method running inside a task executed by the outer one.

janondrusek commented 2 years ago

@lewissbaker is currentThreadContext what you meant?