Skip to content
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

0.18.0.pre breaks Celluloid.running? #748

Closed
HoneyryderChuck opened this issue Feb 2, 2017 · 5 comments
Closed

0.18.0.pre breaks Celluloid.running? #748

HoneyryderChuck opened this issue Feb 2, 2017 · 5 comments

Comments

@HoneyryderChuck
Copy link

HoneyryderChuck commented Feb 2, 2017

> $ bundle exec pry                                                                           
[1] pry(main)> $CELLULOID_BACKPORTED=false                                                                 
=> false                                                                                                   
[2] pry(main)> require "celluloid"                                                                         
=> true                                                                                                    
[3] pry(main)> Celluloid.running?                                                                          
Celluloid::Error: Celluloid is not yet started; use Celluloid.boot                                         
from /home/.bundle/ruby/2.1.0/gems/celluloid-0.18.0.pre/lib/celluloid.rb:38:in `actor_system' 
[4] pry(main)>                                                                                             
@tsabat
Copy link

tsabat commented Feb 16, 2017

I've experienced this too.

@tarcieri
Copy link
Member

This is at least partially intentional:

require "celluloid" does NOT call Celluloid.boot
require "celluloid/autostart" is the equivalent of require "celluloid" && Celluloid.boot

This allows tools using Celluloid as a library to avoid automatically starting Celluloid's background services simply by loading the library.

As far as what Celluloid.running? should do in this case, perhaps it should just return false. I am definitely open to that being the behavior here.

@HoneyryderChuck
Copy link
Author

@tarcieri I get the meaning of the new require rules and I welcome them 👍 It's the running? call semantics which seem iffy. But since we are on the same page regarding that (about returning false), that'll make accepting the PR easier ;)

@tarcieri
Copy link
Member

Please send a PR at your leisure

@HoneyryderChuck
Copy link
Author

@tarcieri already did, weeks ago #749

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants