Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Thread local propagation #125

wants to merge 368 commits into


None yet

Update TaskWithThreadLocals to be its own class, without Task superclass (which no longer exists).

tarcieri and others added some commits Jun 12, 2012

Merge pull request #47 from motionbox/clear_registry
add a method to clear the registry (for use in tests)
prune subscriptions from dead actors
Test fails; not sure how to kill a weakref.
make fanout notifier an actor
Links to subscribers and prunes their subscriptions when they are
terminated. No need for a mutex or weakrefs.
Added a failling test on Celluloid::Notification.
Signed-off-by: chatgris <jboyer@af83.com>
Fix pattern on Celluloid::Notification.
Signed-off-by: chatgris <jboyer@af83.com>
Merge pull request #1 from chatgris/notifications
Fix in pattern for Notifications
Unify the Supervisor and SupervisionGroup classes
* Allow SupervisionGroup to be used without subclassing
* Separate the Registry from Actor
Merge pull request #53 from halorgium/unify-supervisor-trees
Unify the Supervisor and SupervisionGroup classes
Merge pull request #54 from KL-7/patch-1
Fix supervision groups link in the README.
'exclusive' class method
The 'exclusive' method can be used to mark certain instance methods as
always running exclusive. This has the side effect (which so happens to
be the main use case) of running code outside of a Ruby Fiber, allowing
that code to consumer more stack space than the 4kB stacks of YARV
fibers would otherwise allow.
Merge pull request #56 from halorgium/fixes
Some simple refactor fixes
Don't proxy the #class method
I've gone back and forth on this, and now I feel like proxying #class
and hiding the identity of the PoolManager is a bad idea. It's confusing
to those who don't realize that there's a PoolManager proxy between them
and the workers.
Log the cause of aborted async calls
This was previously logging the AbortError, which doesn't give us useful
SystemEvents are no longer exceptions
SystemEvents aren't necessarily errors or even exceptional, they're just
high priority messages. Once upon a time when they were used exclusively
for exit messages (caused by errors) it kind of made sense for them to
be exceptions, but they have grown in scope and usefulness and really
should just be objects.
Eliminate Celluloid::Mailbox#system_event
Celluloid::Mailbox automatically detects system event messages and
treats them as being higher priority
Link with SystemEvents
This introduces the LinkingRequest system event which improves system
robustness and allows linking requests to be handled seamlessly both in
exclusive mode and when using #receive

In addition, link/unlink now use exclusive mode, making them atomic and
transactional. This makes linking semantics easier to reason about.
Don't process system messages during linking
Processing system messages may kick off other events that can interfere
with the linking process. Instead, system messages are queued and
processed after linking operations are complete.
Linking overhaul
This change moves much of the linking mechanics into Celluloid::Actor,
with the versions defined on instances of actors now calling these
versions. This makes linking available outside actor scope.

This was actually needed to correct a deadlock introduced by the
previous round of transactional/exclusive linking changes, as the
linking process was previously going through Actor.current (i.e. the
proxy object)

In addition, this fills out a missing #monitoring? API.
Provide the always_exclusive class method to classes that mixin
Celluloid. always_exclusive makes every method defined in the class
automatically be exclusive.

Test included.
Per tarcieri, remove the always_exclusive method and instead trigger
that behavior by calling exclusive with no args.
Merge pull request #59 from alh13/always_exclusive
Provide the always_exclusive class method to classes that mixin Celluloid

tarcieri and others added some commits Sep 18, 2012

report incidents to a logfile in tests
Also terminate the default reporter to silence messages to stderr.
add silence/unsilence to IncidentReporter
Instead of terminating the actor to silence it, just add a silence
Merge pull request #93 from jrochkind/workaround_mri_at_exit_bug
workaround MRI bug in preserving exit status in at_exit
Revert "Use exclusive mode by default unless within a task"
This change is causing sporadic hangs and seems to be setting @exclusive
inappropriately. It needs to be investigated further.

This reverts commit 6328c9f.
publish incidents with async call
Avoids the issues with making synchronous calls within actor internals.
publish to the correct incident topic
Allows reporters to choose which prognames to subscribe to.
Merge pull request #92 from grantr/logging
Foolscap-style incident logger
Count cores properly in AWS/Ubuntu
Since the /proc/cpuinfo file format has no standard, and ubuntu (or the version we use)
says 'processor' not 'core id'.
Merge pull request #98 from jmoses/master
Make CPU counter try a little harder for linux OS
Better logic for suspending via tasks
There seems to be a deeper bug here with Celluloid.exclusive? not
returning the correct value. I will continue to investigate.

This logic is clearer and also fixes #91
Disable the IncidentReporter by default
The IncidentReporter is untested and probably not ready for primetime
yet. This change disables it by default and uses similar logging to
0.12.0, which is a stdlib Logger which logs to STDERR.
Merge pull request #103 from schmurfy/use_proxy
added use_proxy to switch actor proxy class
Merge pull request #111 from schmurfy/guard_mac
added rb-fsevent gem for guard on Mac OS X
Fix exclusive mode
Celluloid 0.12.1 and subsequent releases completely broke exclusive
mode. This corrects the problem and adds additional tests to ensure it
won't regress in the future.

halorgium commented on 5cfa20a Nov 4, 2012

The code makes so much sense to me now after this change. 👍

tarcieri and others added some commits Nov 14, 2012

Improved debugging for fiber-related errors
Attempt to improve the fiber debugging situation by providing more
context for fiber-related errors from the original exception messages
and also provide a link to the Celluloid wiki with debugging

tarcieri commented Dec 5, 2012

I think if I loop back on this I'll do a rewrite of the existing code...

@tarcieri tarcieri closed this Dec 5, 2012


benlangfeld commented on 4175f4a Dec 13, 2012



halorgium replied Dec 13, 2012

travis was b0rking if i recall.


benlangfeld replied Dec 13, 2012

Works fine for all of my projects which use guard. I'm gonna try out the simpler method with celluloid-io and then perhaps revert this.

Should this be #map rather than #each?


tarcieri replied May 7, 2014


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment