I’m currently seeing a deadlock in my code. What is happening is that when the BWindow based class is shutting down in it’s destructor it’s waiting for a worker thread to finish. And the worker thread is trying to post a message to the owning BWindow class. Which is never going to unlock ever again, cause it’s shutting down. However the worker is waiting to lock the BLooper. I could just use the lock looper with timeout and then use an out of band way to tell the worker to quit trying to send messages. You’d get a stall for at least the “timeout” used, which is less than desirable. But ideally they’d be a more asynchronous way to post messages.
On windows I can just PostMessage to the window handle, which as an opaque type doesn’t need any form of locking. That’d be perfect. Is there something similar on Haiku?