Conversation
…exer, not a global ref
… keyed by thread id hash
| atomically replace the WkThreadMap with `aliveThreads` (given by partition). | ||
| However, if we are pre-empted, and wake up later, `aliveThreads` may contain a thread that died while | ||
| we were asleep. In this case, we will have mistakenly added a dead thread back into the list. | ||
| -} |
There was a problem hiding this comment.
Eh, partition is still good: we will not "put back alive threads" into the map, just into the weak-thread map. We might miss a dead-thread who died during the alive list, but that's ok, the next thread along will pick them up. We can't be perfect here, as threads don't clean themselves up from the structure. We are just aiming to ensure some amount of fairness.
There was a problem hiding this comment.
Ah right, you can clobber the threads who have joined the list since the partition...
…emove unordered-containers requirement
…readids, allowing dead threads to be garbage collected
…adMap fields to '-- ^' style, as haddock doesn't like UNPACK pragmas mixed with '-- |'
… context dependent
…omised error msg when the whitespace parser cannot be found
|
Strange bug atm. Somehow, the whitespace parsers are not being initialised in |
|
Yes, without an explicit |
|
Ahh right. Perhaps then we should make this explicit in the docs? (I don't think it is already) |
…sers have not been initialised
|
Can't ensure it, but the wiki docs would point this out, see here |
…Parser maps into one, so that only one atomicModify is necessary during dead-thread cleanup
…Map - it has been superceded by the WsMap
…dMaps, add type signatures to mkSpace where defs
…ltering whitespace parser
Closes #49
Re-implement
mkSpaceusing anIORefto a map of threads to their white space parsers.