InputPipe.WaitForMessage() in a loop: trouble?

Christoph Mueller <[email protected]> Mon, 12 Sep 2005 00:08:50 +0200
Newsgroups gmane.comp.java.jxta.user
Message-ID <[email protected]>
Hi all

If I have a thread that handles incoming messages like this:

while (true) {
    msg = inPipe.WaitForMessage();
    doSomething(msg);                 // [1]
}

What happens if a message arives while I am still at [1], i.e. not done 
processing the last message?

Will the message simply be discarded? Or does it get buffered until the 
next call of WaitForMessage() or poll()?

(If it will get lost, I'll probably have to make some sort of buffer 
myself with a InputMsgListener.)

thanks for your input