lib/sqs_buffer/client.rb in sqs_buffer-0.3.5 vs lib/sqs_buffer/client.rb in sqs_buffer-0.3.6

- old
+ new

@@ -72,10 +72,13 @@ @message_queue.length end def buffer # Return a copy of the array events to guard against potential mutation - Marshal.load( Marshal.dump(@message_queue) ) + # This fails on jruby 9000 for some reason.... + # Marshal.load( Marshal.dump(@message_queue) ) + # Should we dup all items? look at benchmark :( + @message_queue.dup end def shutting_down? @running.false? && worker_thread_alive? end