Quantcast
Channel: Comments on: An Introduction to Celluloid, Part II
Browsing all 10 articles
Browse latest View live

By: Esteban

Isn’t there a way to tell the program to wait for the actors before finishing? Something like Thread#join ?

View Article



By: Dhaivat Pandya

The square operation is too “simple” (not computationally intensive) for it to be worthwhile using the actor pool.

View Article

By: Dhaivat Pandya

Hi,You can use supervision groups – those will most likely be covered in Part 3.

View Article

By: Jonathan Rochkind

Super useful, thanks! I’m going to have to read it a couple more times to fully understand what’s going on.But one question about supervise. In your example you’re doing supervise_as inside the loop....

View Article

By: Dhaivat Pandya

The question you bring up is important.The registry doesn’t have anything to do with supervision – it is for the programmer’s use, not for Celluloid. So, by overwriting the registry, we are not...

View Article


By: Jonathan Rochkind

okay, cool. Is there a way to supervise without using the registry then? In your example wit supervise_as, the registry seems to have something to do with supervision, yeah? In your example, the only...

View Article

By: Jonathan Rochkind

Ah, I see there is in the docs. https://github.com/celluloid/celluloid/wiki/SupervisorsIn fact, for your particular example… I don’t think supervision gets you anything. It’ll restart the actor if it’s...

View Article

By: Dhaivat Pandya

The supervision ties together in Part 3 :)

View Article


By: Jabari

You did:(2..1000).to_a.map do |i| pool.prime! i endSimpler and faster:(2..1000).each {|i| pool.prime! i }

View Article


By: Jabari

Also, for more idiomatic Ruby code:This def prime(number) if number.prime? puts number end endis more idiomatic Ruby as this: def prime(number) puts number if number.prime? endor this as oneliner: def...

View Article
Browsing all 10 articles
Browse latest View live




Latest Images