File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,12 @@ def default_reference_class
77
77
Reference
78
78
end
79
79
80
+ # override to se different default executor, e.g. to change it to global_operation_pool
81
+ # @return [Executor]
82
+ def default_executor
83
+ Concurrent . configuration . global_task_pool
84
+ end
85
+
80
86
# tell self a message
81
87
def tell ( message )
82
88
reference . tell message
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ def initialize(opts = {}, &block)
55
55
@context_class = Child! opts . fetch ( :class ) , AbstractContext
56
56
allocate_context
57
57
58
- @executor = Type! opts . fetch ( :executor , Concurrent . configuration . global_task_pool ) , Executor
58
+ @executor = Type! opts . fetch ( :executor , @context . default_executor ) , Executor
59
59
raise ArgumentError , 'ImmediateExecutor is not supported' if @executor . is_a? ImmediateExecutor
60
60
61
61
@reference = ( Child! opts [ :reference_class ] || @context . default_reference_class , Reference ) . new self
You can’t perform that action at this time.
0 commit comments