I’m porting a cross-platform GUI thingus to Haiku, and need a way of getting/dispatching more events before MessageReceived() has returned. Reentrant message handling, you might call it. (This is to give the illusion of a blocking API call, when behind the scenes events are still being processed)
Is this possible from within a BLooper as it stands, or do I need to come up with my own solution? I don’t think it would be too difficult, but I wanted to check with the experts before I overly complicate this.
edit: I should add that I’ve already tried experimenting with the looper’s message queue, but it seems to be stuck. Hence my asking here whether it’s possible in the first place.
Another way would be to hold onto the BMessage with the work request (take it out of normal processing with DetachCurrentMessage), do your other stuff, and when the work is done, activate the reply to the saved message.