Skip to content

Instantly share code, notes, and snippets.

@yorickpeterse
Created April 8, 2014 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yorickpeterse/10176336 to your computer and use it in GitHub Desktop.
Save yorickpeterse/10176336 to your computer and use it in GitHub Desktop.
diff --git a/rss_growth_during_redis_publish.rb b/rss_growth_during_redis_publish.rb
index f6d1526..cecfdef 100755
--- a/rss_growth_during_redis_publish.rb
+++ b/rss_growth_during_redis_publish.rb
@@ -8,6 +8,14 @@ require 'celluloid/io' # Unclear if this is required, or if Celluloid will hand
require 'celluloid/redis'
require 'celluloid/autostart'
+Thread.new do
+ loop do
+ puts "Fibers: #{ObjectSpace.each_object(Fiber).count}"
+
+ sleep 5
+ end
+end
+
class Leaky
include Celluloid
# include Celluloid::IO
@@ -26,7 +34,7 @@ class Leaky
def publish
@redis.publish "test", @publish_count += 1
- # @redis.publish "test", 'a' # RSS growth is independent of message length
+ # @redis.publish "test", 'a' # RSS growth is independent of message length
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment