Skip to content
This repository has been archived by the owner on Dec 25, 2020. It is now read-only.

Commit

Permalink
Continuations enabled by default
Browse files Browse the repository at this point in the history
Remove Wee.runcc
  • Loading branch information
mneumann committed Oct 19, 2010
1 parent d88706a commit 09e9dad
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 16 deletions.
2 changes: 1 addition & 1 deletion examples/arc_challenge2.rb
Expand Up @@ -43,4 +43,4 @@ def go
end
end

Wee.runcc(ArcChallenge) if __FILE__ == $0
Wee.run(ArcChallenge) if __FILE__ == $0
2 changes: 1 addition & 1 deletion examples/cheese_task.rb
Expand Up @@ -24,4 +24,4 @@ def inform_cheese
end
end

Wee.runcc(CheeseTask) if __FILE__ == $0
Wee.run(CheeseTask) if __FILE__ == $0
2 changes: 1 addition & 1 deletion examples/continuations.rb
Expand Up @@ -25,4 +25,4 @@ def render(r)

end

Wee.runcc(MainPage)
Wee.run(MainPage)
5 changes: 2 additions & 3 deletions examples/demo.rb
Expand Up @@ -127,10 +127,9 @@ def render(r)

if __FILE__ == $0
if ARGV[0] == "cc"
# Enable continuation demos
$cc = true
Wee.runcc(Demo)
else
Wee.run(Demo)
else
Wee.run(Demo, :use_continuations => false)
end
end
11 changes: 1 addition & 10 deletions lib/wee.rb
Expand Up @@ -44,7 +44,7 @@ def Wee.run(component_class=nil, params=nil, &block)
params[:port] ||= 2000
params[:public_path] ||= nil
params[:additional_builder_procs] ||= []
params[:use_continuations] ||= false
params[:use_continuations] ||= true
params[:print_message] ||= false
params[:autoreload] ||= false

Expand Down Expand Up @@ -107,12 +107,3 @@ def Wee.run(component_class=nil, params=nil, &block)

Rack::Handler::WEBrick.run(app, :Port => params[:port])
end

#
# Like Wee.run, but for use with continuations.
#
def Wee.runcc(component_class, params=nil)
params ||= Hash.new
params[:use_continuations] = true
Wee.run(component_class, params)
end

0 comments on commit 09e9dad

Please sign in to comment.