Dear Dom:

On 26.10.2025 17:53, [email protected] wrote:
... cut ..

The patch as it stands carries out an extra lock release in InterpreterInstance::terminate whether it needs to or not just to deal with the case where an extra one is actually needed because a new activity was created. For cases where it is not needed this extra unlock theoretically  leads to the lock count becoming negative. The locks we currently use are forgiving of and ignore this but it is still wrong, and  were we ever to switch to using different  locks (e.g. C++ recursive_mutexes – which I **might** have tested locally) or should future operating system releases be less forgiving this imbalance could causes deadlocks or other errors when interpreter instances shutdown “normally” (i.e. without the extra activity creation)

Hmm, what would you think would have happened if you had tested e.g. C++ recursive_mutexes [1], would have everything continued to work in ooRexx, i.e. would the test suite have passed?
;)

Best regards

---rony

[1] <https://prodevelopertutorial.com/c-11-feature-c-multithreading-tutorial-recursive-mutex-in-c-threading/>

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

Reply via email to