Recursive processing of BLooper messages

Michael Pfeiffer <[email protected]> Sat, 3 Feb 2007 13:00:53 +0100
Newsgroups gmane.os.openbeos.printing
Message-ID <[email protected]>
Hi

I do not know how to solve the following problem:

In BeOS R5 you can call BPrintJob.ConfigPage() inside a BLooper hook  
method and although the method ConfigPage() did not return yet, the  
calling BLooper still is processing messages sent to it.

In the Haiku implementation of ConfigPage(). A synchronous message is  
sent to the print_server, the print_server then opens the dialog and  
when the dialog is closed it sends a response. ConfigPage() handles  
the response message and returns. Of course this blocks the calling  
thread.

In case the calling thread is a BLooper thread. My idea is to do the  
communication with the print_server in a separate thread. In the  
meantime ConfigPage() keeps processing the messages sent to the  
BLooper until the spawned thread terminates.

What are your thoughts? How can the nested processing of messages be  
accomplished? Are there other ways to do that?

- Michael
PS: Cross-posting to get more attention. Please reply to open-beos- 
[email protected] if possible.