-
Notifications
You must be signed in to change notification settings - Fork 417
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
reopening "Add Delay#reconfigure and Fix configuration to be thread safe" #90
Conversation
The failed |
# initialize the global thread pools if necessary | ||
configuration.global_task_pool | ||
configuration.global_operation_pool | ||
configuration.global_timer_set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the reason for this early initialization? Couldn't this lead to initialization of pools even if they are not needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it could. However the pools themselves are lazy when creating threads (the pure Ruby ones, I'm not certain about the Java ones). So I felt the overhead would be small. Mainly I was just trying for the simplest implementation. I'm fine with delaying pool initialization until they are actually used.
I've also checked all the other operators (e.g |
allows to replace the block evaluating to the value with new one only if a delay is still incomplete?
by replacing ||= operator with Delay instances
use Delay same as in configuration
@pitr-ch Will you be merging this soon? I'd like to include this and the |
@jdantonio Travis passed, if you are ok with the changes it's ready to be merged. |
@pitr-ch It looks good to me. You have commit access. Please feel free to merge. |
reopening "Add Delay#reconfigure and Fix configuration to be thread safe"
follow up of #89