Skip to content
Browse files

Add a basic fiber pool example

  • Loading branch information...
1 parent 9f9084f commit f69575e8c816baf5e65337c5079082453a67eb3f @lifo lifo committed Feb 18, 2011
Showing with 18 additions and 0 deletions.
  1. +18 −0 examples/fibers_hello_world.ru
View
18 examples/fibers_hello_world.ru
@@ -0,0 +1,18 @@
+require "rubygems"
+require "bundler"
+Bundler.setup(:default, :example)
+
+require 'cramp'
+
+class FibersController < Cramp::Action
+ use_fiber_pool :size => 200
+
+ def start
+ render "Hello World"
+ finish
+ end
+end
+
+# bundle exec thin -V -R examples/fibers_hello_world.ru start
+# bundle exec rainbows -E deployment -c examples/rainbows.conf examples/fibers_hello_world.ru
+run FibersController

0 comments on commit f69575e

Please sign in to comment.
Something went wrong with that request. Please try again.