concurrent-ruby icon indicating copy to clipboard operation
concurrent-ruby copied to clipboard

shutdown/execute timertask will generate one more thread run the same task

Open xchen0123 opened this issue 8 years ago • 1 comments

  • Operating system: linux
  • concurrent-ruby version: 1.0.5
  • concurrent-ruby-ext installed: yes
  • concurrent-ruby-edge used: no

If each time i shutdown and execute the timertask as example shown, there will be one more thread running the duplicated task.
example:

task = Concurrent::TimerTask.new(execution_interval: 3, timeout_interval: 1) { p Time.now; p rand(100)}
task.execute

sleep(3)

3.times do
  task.shutdown
  task.execute
end

sleep(10)

xchen0123 avatar Jun 08 '17 01:06 xchen0123

Thanks for reporting, would you have time to look for a solution?

pitr-ch avatar Jul 23 '17 13:07 pitr-ch