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
Actress post release fixes #100
Conversation
I've fixed the reset duplication and disabled the reset only for actress tests. Weird thing is that running actress tests standalone at least 5 hundred times did not produce single deadlock on my machine on JRuby. When I run it altogether I'll get deadlocks intermittently, I need to find out how one influences another. I managed to get it much more stable with explicit actor termination though. |
Thank you for looking into this. |
Finally, I've got it working :) It's ready for review and merge. |
Looks great! 🤘 |
Thanks, I'll keep it open few days if anybody else wants to look at the changes, then I'll merge it. |
Absolutely, we should create a 0.6.1 release once you merge this. |
@pitr-ch To ease the transition, what would you think about an additional configuration option: class Configuration
def use_new_actor
Concurrent.send(:remove_const, 'Actor')
Concurrent.const_set(:Actor, Concurrent::Actress)
end
end
# later...
Concurrent.configure{|config| config.use_new_actor }
class FooActor
include Concurrent::Actor
end |
@jdantonio I am not sure, it may create unpleasant surprises and it will keep printing the classes as
We can also consider:
Personally I would wait to 0.7 and keep I'll add the documentation here then I'll merge and we can release new version. |
Let's wait, then. Safe is more important than convenient. |
I've found one intermittent failing test so one todo for me:
Other than that this PR is ready to merge. You can peruse documentation here before it's merged. I'll be glad for feedback. |
@pitr-ch It's your call. I'm comfortable with the work is done. Please fell free to merge whenever you are ready. |
to be able to find out where a deadlock is
@jdantonio This branch is ready for merge. Please give the changes in documentation a look before merging if you are ok with them. Links for API doc are changed to go to http://ruby-concurrency.github.io/concurrent-ruby/frames.html. |
@reference = Reference.new self | ||
@name = (Type! opts.fetch(:name), String, Symbol).to_s | ||
@terminated = Event.new | ||
@executor = Type! opts.fetch(:executor, Concurrent.configuration.global_task_pool), Executor |
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.
@pitr-ch I just discovered that this line causes the global_task_pool Delay to evaluate. This makes it impossible to explicitly configure the global task pool. This code will fail with Concurrent::ConfigurationError: global task pool was already set
:
require 'concurrent'
Concurrent.configure do |config|
config.global_task_pool = Concurrent::CachedThreadPool.new
end
I'm not sure if there is anything that can be done about this, but could you please look into it?
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.
Ah that's because ROOT actor is always created when actress is loaded. I'll delay it as well.
No description provided.