search for: asynch_foo_test

Displaying 1 result from an estimated 1 matches for "asynch_foo_test".

2010 Jun 02
0
Multiple threads writing to the same Starling queue doesn't work?
...ys, I can''t find a clear answer to this: is it possible/correct to have several threads write to the same Starling queue at the "same time"? It doesn''t seem reliable according to my tests - but maybe I am doing something wrong. If I do: def test_starling FooWorker.asynch_foo_test(:my_id => ''foo'') temp = [] for i in 1..1000 temp << Thread.new(i) {|random_value| do_stuff(random_value)} end temp.each do |t| t.join end end def do_stuff(lvalue) starling = Starling.new(''localhost:22122'') starling.set(''f...