Conversation
94d2f68 to
c65fa2f
Compare
bolt12
left a comment
There was a problem hiding this comment.
Looks good! Just some minor comments.
GHC Timeout API uses MVars in its implementation, mine #9 does not because at the time there wasn't a suitable MVar definition in IOSim. I don't think I will change my PR to use MVars because these ones are based in STM and the whole purpose of my PR is to stay away from STM. My implementation mimics MVar behavior in IOSim so it should be good enough for now... I am not sure what @dcoutts is going to say about these MVars but a truly faithful MVar implementation should be specific to IOSim and thus implemented there, right?
|
Also stylish is failing in CI |
You're using the btw, this implementation relies on @dcoutts idea. |
I was, now it is using STRef's. How does STM provide fairness, I remember seeing that STM doesn't exactly guarantee fairness like MVars do |
|
Including a default implementation using 'MonadSTM', which guarantees fairness. Co-authored-by: Duncan Coutts <dcoutts@users.noreply.github.com>
So when you say:
what do you mean by fairness? what I understand by fairness here is that if you have various thread blocked on waiting for a |
It means blocked |
|
The same fairness (FIFO order) is guaranteed by |
|
@coot I understand now! Thank you! :D |
MVar's for
IOSim