Skip to content

Commit 9736110

Browse files
committed
Reset PerThreadExecutor to original state.
1 parent 93e6689 commit 9736110

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/concurrent/executor/per_thread_executor.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
require_relative 'executor'
2-
31
module Concurrent
42

53
class PerThreadExecutor
6-
include Executor
74

85
def self.post(*args)
96
raise ArgumentError.new('no block given') unless block_given?
@@ -17,5 +14,10 @@ def self.post(*args)
1714
def post(*args, &task)
1815
return PerThreadExecutor.post(*args, &task)
1916
end
17+
18+
def <<(task)
19+
PerThreadExecutor.post(&task)
20+
return self
21+
end
2022
end
2123
end

0 commit comments

Comments
 (0)