diff --git a/lib/celluloid.rb b/lib/celluloid.rb
index <HASH>..<HASH> 100644
--- a/lib/celluloid.rb
+++ b/lib/celluloid.rb
@@ -55,8 +55,32 @@ module Celluloid
     def exception_handler(&block)
       Logger.exception_handler(&block)
     end
+
+    # Shut down all running actors
+    # FIXME: This should probably attempt a graceful shutdown of the supervision
+    # tree before iterating through all actors and telling them to terminate.
+    def shutdown
+      Timeout.timeout(SHUTDOWN_TIMEOUT) do
+        futures = Actor.all.each do |actor|
+          begin
+            actor.future(:terminate)
+          rescue DeadActorError, MailboxError
+          end
+        end
+
+        futures.each do |future|
+          begin
+            future.value
+          rescue DeadActorError, MailboxError
+          end
+        end
+      end
+    end
   end
 
+  # Terminate all actors at exit
+  at_exit { shutdown }
+
   # Class methods added to classes which include Celluloid
   module ClassMethods
     # Create a new actor
@@ -250,27 +274,6 @@ module Celluloid
 
     super
   end
-
-  # Terminate all actors at exit
-  # FIXME: This should probably attempt a graceful shutdown of the supervision
-  # tree before iterating through all actors and telling them to terminate.
-  at_exit do
-    Timeout.timeout(SHUTDOWN_TIMEOUT) do
-      futures = Actor.all.each do |actor|
-        begin
-          actor.future(:terminate)
-        rescue DeadActorError, MailboxError
-        end
-      end
-
-      futures.each do |future|
-        begin
-          future.value
-        rescue DeadActorError, MailboxError
-        end
-      end
-    end
-  end
 end
 
 require 'celluloid/version'
Factor at_exit handler into Celluloid.shutdown