2010/2/17 Neil Brown <nc...@kent.ac.uk>: > You don't need to do use ThreadId: MVar has an Eq instance, so you could > make your Lock type derive an Eq instance, and then you can just compare the > Locks to remove it after the timeout occurs (e.g. using delete to take it > out of the list; it should be quite near the head of the list anyway). In > fact, you may as well make most of your types derive an Eq instance where > possible, as this can be useful sometimes.
Now I am wondering why I didn't think of that before. It's an elegant solution. Thanks! _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe