| 97 | | Arguably, Hugs has made the wrong choice from a fairness point of view, |
| 98 | | but moving the position of the yield, or inserting them more frequently, |
| 99 | | should not be a big deal. |
| | 97 | Arguably, Hugs has made the wrong choice from a fairness point of view. It would be possible to make Hugs yield more often, such as in IO-monad's bind operator, but even this wouldn't be quite enough for fairness, because a thread might hang indefinitely performing a non-IO computation. Yielding outside of the IO monad in Hugs doesn't seem possible without overhauling the concurrency implementation completely. |