-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mark RubySingleThreadExecutor as a SerialExecutorService #1070
base: master
Are you sure you want to change the base?
Mark RubySingleThreadExecutor as a SerialExecutorService #1070
Conversation
The old implementation doesn't look substantially different than the new one does. Both call Old implementation:
Current implementation: concurrent-ruby/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb Lines 338 to 356 in eae2851
I'll leave this PR open a little longer to see if anyone else has thoughts, otherwise I can accept it. |
I should also note I didn't see any test assertions of this behavior. The only place I saw concurrent-ruby/spec/concurrent/executor/executor_service_shared.rb Lines 202 to 211 in eae2851
|
That's what I saw too when checking if/how to adapt tests. On the other hand, the To be honest, my original intend for my question in #1069 was to ensure that the semantics of a Still, if this holds, it may be worthwhile to update the def serialized?
@max_length <= 1
end I believe the same should be valid for the |
This resolves #1069.
However, I'm still not 100% sure if the
RubySingleThreadExecutor
is actually serialized. From my understanding of the code, it is, but there may be edge-cases I'm missing (such as when the thread dies).As such, I'd still appreciate if someone who knows the (intended) RubyThreadPoolExecutor semantics to review this.