From: Nicholas Poole Date: 2007-11-12T21:52:55+09:00 Subject: Threading from a loop Hi, My problem is that I want a function to start as a new thread every time it's called, hence allowing the loop to continue and spawn a thread for each iteration of the loop. Currently my loop waits for the function to end before it continues. If anyone can anyone tell me what I'm missing, or even refer me to some good documentation, I'd be grateful. My current code is as follows: cl.add_message_callback do |m| if m.type != :error #break off newreplythread = Thread.new(cl, m) { #function call is here } end } (Maybe I'm mistaking the loop for something else, but it's behaviour apears the same) Thanks NickPoole -- Posted via http://www.ruby-forum.com/.