Re: InputPipe.WaitForMessage() in a loop: trouble?
Christoph Mueller <[email protected]> Mon, 12 Sep 2005 00:23:28 +0200
| Newsgroups | gmane.comp.java.jxta.user |
|---|---|
| Message-ID | <[email protected]> |
Christoph Mueller wrote:
> 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?
uhm, nevermind, sorry.
I just found InputPipeImpl.java, which seems to indicate an automatic
message queue with size 100 for just this case, UNLESS there are any
PipeMsgListeners registered.