From: Anders Rosendal Date: 2002-04-18T05:06:03+09:00 Subject: Hi Hi. I making a multithreaded downloader and was thinking there must be an easier way than "My Way" :-) The problem is that I what "get" and "put" not to run in parallel(don't know if they can, but better safe ...) So now I've put them in the same function :-) Are there any documentation for the "sync.rb" module? Couldn't find any on google. I think I need some locking. def do_stuff(method, param="") @mutex.synchronize do if method == "get" url = @urls.shift @twilightzone << url if(url) return url else method == "put" @urls << MyUrl.new(param) end end end