Having learned that running the test suite on Jenkins excludes the 
"EventSemaphore.testGroup" as it
causes a failure in "test_wait_concurrent" (starting in line # 137) I looked up 
the documentation
and the test on Linux.

It seems that the waiting activity is supposed to run after the semaphore gets 
posted. The
documentation says with regards to "post": "Sets the event semaphore to the 
posted state. All
suspended activities waiting for this event are released. Activities calling 
the wait method while
the event semapahore is already in the posted state will continue executing 
without getting suspended."

However, resetting the semaphore immediately thereafter blocks the waiting 
activity and makes it
time-out. The documentation says with regards to "reset": "Clears the event 
semaphore. During the
time the semaphore is cleared, any activities starting a blocking wait get 
suspended."

It seems that on Linux doing a

    sem~~post~reset

will cause the waiting activity to not have a chance to get dispatched (as a 
result of the "post"
message) because the immediately following "reset" message will inhibit the 
waiting activity to run,
causing it to timeout. Leaving out the "reset" makes the test case work. Also, 
if inserting a
syssleep between the post and reset messages makes the test case succeed:

    sem~post
    call syssleep 0.01
    sem~reset

Would it be o.k. to change the test case accordingly (inserting a syssleep 
between "post" and "reset")?

---rony


_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to