rexxref.pdf documents MutexSemaphore in "5.4.12. MutexSemaphore Class" and 
gives an example.

The class defines the acquire() method to acquire() the semaphore (increasing the nesting level by 1 each time) and release() to release it (decreasing the nesting level by 1 each time).

The example does not demonstrate the use of release() at all, as it relies on the feature that if an activity (thread) goes away, the mutexSemaphore it holds will get released automatically. Also, the example demonstrates that acquiring a mutex semaphore succeeds on the same activity (thread). However, contradicting the acquire() documentation that for each acquire() a release() needs to be issued the sample does not employ release() at all. It works, because the held mutex gets released once the acitivty (thread) that holds the semaphore ends.

The documentation should get additional explanations for the example and/or get another example that employs release() according to the documentation. Also, maybe a native English speaker can clarify the documentation such that the current example can be immediately understood.

---rony




_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to