Skip to content

Fix threadDelay in threaded mode and a few other things

Author: Andreas Klebinger klebinger.andreas@gmx.at Date: Mon Mar 9 11:25:14 2020 +0100

Fix multi threaded threadDelay and a few other small changes.

Multithreaded threadDelay suffered from a race condition
based on the ioManagerStatus. Since the status isn't needed
for WIO I removed it completely.

This resulted in a light refactoring, as consequence we will always
wake up the IO manager using interruptSystemManager, which uses
`postQueuedCompletionStatus` internally.

I also added a few comments which hopefully makes the code easier to
dive into for the next person diving in.

commit fa677ab3 Author: Andreas Klebinger klebinger.andreas@gmx.at Date: Thu Mar 5 17:55:43 2020 +0100

Clean up code surrounding IOPort primitives.

According to phyx these should only be read and written once per
object. Not neccesarily in that order.

To strengthen that guarantee the primitives will now throw an
exception if we violate this invariant.

As a consequence we can eliminate some code from their primops.
In particular code dealing with multiple queued readers/writers
now simply checks the invariant and throws an exception if it
was violated. That is in contrast to mvars which will do things
like wake up all readers, queue multi writers etc.
Edited by Andreas Klebinger

Merge request reports