Do you want async-channel, maybe? If not, then rolling your own syncronization pattern via the CML-like primitives is the way to go. Once you get used to programming with them, they are very easy to use and easy to make thread-safe things (contrary to popular wisdom that thread-safety is hard to achieve; it is only hard to achieve with bad primitives :).
Robby 2011/10/5 Ivanyi Peter <piva...@freemail.hu>: > >> - If the original list to be processed is very long, then the > construction of >>> the second phase list shouldn't wait for bottle neck items to cons the >>> list >>> elsewhere where possible. The speed gain wouldn't be substantial though, >>> since it is just building a list, and you cannot finish it until the last >>> item is available, anyway. >> >>You'd want to basically make the result list into a queue in which >>elements are inserted. > > Hi All, > > According to the documentation: > > "(require data/queue) > > This module provides a simple mutable queue representation, > first-in/first-out only. Operations on queues mutate it in a thread-unsafe > way. > > " > > So this is not thread-safe. Is it futures safe? > > Is there any queue implementation which is thread-safe? > > > > Thanks, > > > > Peter Ivanyi > > > > _________________________________________________ > For list-related administrative tasks: > http://lists.racket-lang.org/listinfo/users > _________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users