Also, my clever trick with try_lock() might not be realtime safe, even if we intend not to acquire the lock, since it might interact with the OS thread scheduler regardless: https://www.youtube.com/watch?v=Tof5pRedskI&t=2280s
Although in the Q&A sessions, the speaker does imply that if everyone is doing try_lock() and never lock(), it might be okay?
Also, my clever trick with
try_lock()
might not be realtime safe, even if we intend not to acquire the lock, since it might interact with the OS thread scheduler regardless: https://www.youtube.com/watch?v=Tof5pRedskI&t=2280sAlthough in the Q&A sessions, the speaker does imply that if everyone is doing
try_lock()
and neverlock()
, it might be okay?