| | |
| | | reader[i].start(); |
| | | } |
| | | debugInfo("multipleWriterMultipleReader produces and readers started"); |
| | | Thread.sleep(2000); |
| | | //Thread.sleep(2000); |
| | | } |
| | | finally |
| | | { |
| | |
| | | numMsgRcv++; |
| | | broker.updateWindowAfterReplay(); |
| | | } |
| | | if ((msg == null) || (numMsgRcv >= numMsgExpected)) |
| | | // if ((msg == null) || (numMsgRcv >= numMsgExpected)) |
| | | // Terminating this thread when the nb of msg received is reached |
| | | // may prevent to process a WindowMsg that would unblock the dual |
| | | // writer thread. |
| | | if (msg == null) |
| | | break; |
| | | } |
| | | } catch (SocketTimeoutException e) |
| | |
| | | "a BrokerReader received an Exception" + e.getMessage() |
| | | + stackTraceToSingleLineString(e); |
| | | } |
| | | assert(numMsgRcv >= numMsgExpected); |
| | | } |
| | | } |
| | | |