I have modified libcom/test/epicsMessageQueueTest.cpp to add 2 new tests. Both tests send 1000 messages to a new receiver thread. The receiver thread calls q->receive() with a 0.01 second timeout. In the first test there is an epicsThreadSleep of 0.011 seconds in the q->send() loop. In the second test the sleep is 0.010 seconds.
These are the important results:
# Single receiver with timeout, single sender with sleep tests:
# These tests last 20 seconds ...
ok 57 - sleep=0.011
not ok 58 - sleep=0.010
# numSent should be 1000, actual=1000, numReceived should be 1000, actual=935
I have modified libcom/ test/epicsMessa geQueueTest. cpp to add 2 new tests. Both tests send 1000 messages to a new receiver thread. The receiver thread calls q->receive() with a 0.01 second timeout. In the first test there is an epicsThreadSleep of 0.011 seconds in the q->send() loop. In the second test the sleep is 0.010 seconds.
These are the important results:
# Single receiver with timeout, single sender with sleep tests:
# These tests last 20 seconds ...
ok 57 - sleep=0.011
not ok 58 - sleep=0.010
# numSent should be 1000, actual=1000, numReceived should be 1000, actual=935