Mateusz Kowalczyk <fuuze...@fuuzetsu.co.uk> writes: > Thanks for the investigation. While I have not gotten a chance to play > with this myself, it does seem like your MVar implementation has a sound > basis.
That's good! Thanks for making sure we understood the requirements. > While it'd be great to have someone familiar with the inner-workings to > step in and confirm your findings, it seems that your implementation > should work, at least from the scheduling perspective. I can not guess > what the actual performance might be as I'm not familiar with Guile's > performance profile but I suppose that's another issue. I wouldn't expect very high performance from the current implementation, which was written in Scheme in the most straightforward manner possible, and built upon fairly heavy "fat" mutexes and condition variables. I could write a much faster implementation in C, based on other pthread primitives and perhaps optimized using primitives from libatomicops, and perhaps we should do that at some point. Mark