Changeset 301

Show
Ignore:
Timestamp:
01/04/07 07:17:37 (2 years ago)
Author:
blackhedd
Message:

Added EventMachine::Deferrable#future, a syntactic sugaring for Deferrables.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • version_0/lib/em/deferrable.rb

    r223 r301  
    4343    return unless block 
    4444    if @deferred_status == :succeeded 
    45       block.call 
     45      block.call *@deferred_args 
    4646    else 
    4747      @callbacks ||= [] 
     
    5353    return unless block 
    5454    if @deferred_status == :failed 
    55       block.call 
     55      block.call *@deferred_args 
    5656    else 
    5757      @errbacks ||= [] 
  • version_0/lib/eventmachine.rb

    r296 r301  
    5555require "eventmachine_version" 
    5656require 'em/deferrable' 
     57require 'em/future' 
    5758require 'em/eventable' 
    5859#-- Additional requires are at the BOTTOM of this file, because they 
  • version_0/Rakefile

    r300 r301  
    202202end 
    203203 
     204desc "Test futures" 
     205task :test_futures do |t| 
     206  run_tests t, :extension, "test_future*.rb" 
     207end 
     208 
    204209 
    205210desc "Build everything"