Permalink
Commits on Nov 13, 2011
  1. Add a basic dynamic environments implementation

    If an exception is raised in the middle of a callback (and not handled
    in the callback), the only opportunity the programmer has to deal with
    it is in the global error handler. However, in the error handler, the
    context in which the error was raised has been lost. With this patch,
    callbacks can store values in dynamic environments. If an exception is
    raised, the global error handler can access the same dynamic
    environment.
    
    USAGE:
    
    'EventMachine::Environment.dynamic_env' returns the current dynamic
    env, which can be accessed like a hash.
    
    EXAMPLE:
    
    <<EOF
    require 'rubygems'
    require 'eventmachine'
    
    EventMachine.error_handler do |er|
      puts "Foo key is #{EventMachine::Environment.dynamic_env[:foo].inspect}"
      EventMachine.stop
    end
    
    EventMachine.next_tick do
      EventMachine::Environment.dynamic_env[:foo] = :bar
      raise 'Raised!'
    end
    
    EventMachine.run
    EOF
    
    CAVEATS:
    
    - This hasn't been tested extensively. I'm sure it doesn't work in
      corner cases. I wouldn't be shocked if it doesn't work in most
      normal cases.
    
    - The code is pretty bad right now. I'll fix it up later once it's
      closer to a final version.
    committed Nov 13, 2011
Commits on Oct 21, 2011
  1. Revert "Write maximum of 16KB of data to an SSL connection per tick (…

    …fixes #233)" for #273
    
    This reverts commit b237c03.
    tmm1 committed Oct 21, 2011
Commits on Oct 20, 2011
Commits on Oct 5, 2011
  1. Merge pull request #229 from renekalff/oversleeping

    Modified TimeTilNextEvent to calculate based on current time
    tmm1 committed Oct 5, 2011
Commits on Sep 30, 2011
Commits on Sep 29, 2011
  1. Failing test for issue 185

    raggi committed Sep 29, 2011
  2. Merge branch 'close_schedule_fix'

    * close_schedule_fix:
      Expose EM.num_close_scheduled, and utilise in TimeTilNextEvent to avoid long waits for unbinds.
    raggi committed Sep 29, 2011
  3. whitespace

    tmm1 committed Sep 29, 2011
  4. Merge branch 'master' into close_schedule_fix

    * master: (146 commits)
      Fix reconnect on unix-domain connection #261
      Fix rake-compiler cross compiling issues for win32 gems
      Another compile warning
      Fix compile warning
      README grammar fix
      bump rake-compiler dependency
      Remove dependency on readbytes.rb for ruby 1.9 (fixes #167, #234)
      Fix compilation on MSVC2008 (fixes #253)
      fix code samples in iterator docs
      pull pause/resume logic down into EventableDescriptor
      test EM::Connection#pause on popen connections
      print out ssl errors to stdout before exploding
      Renaming EventMachine_t Closing to Deregister
      Watched sockets should still receive Closing
      Tweaking the patch to only affect socket shutdown and close. Ref: #242
      Alias Ruby C API methods for 1.8/1.9 compat
      Add pure-ruby implementations of EM::Connection#set_sock_opt and #get_sock_opt
      Implement EM::Connection#set_sock_opt
      Never close STDIN, STDOUT and STDERR (i.e. only close when fd > 2) Should solve #183
      Segfault fix for pipes
      ...
    
    Conflicts:
    	ext/em.cpp
    	tests/test_basic.rb
    raggi committed Sep 29, 2011
Commits on Sep 17, 2011
  1. Merge pull request #262 from dre3k/master

    Fix reconnect on unix-domain connection #261
    tmm1 committed Sep 17, 2011
Commits on Sep 16, 2011
  1. Another compile warning

    tmm1 committed Sep 16, 2011
  2. Fix compile warning

    tmm1 committed Sep 16, 2011
Commits on Sep 15, 2011
Commits on Sep 12, 2011
  1. Merge pull request #256 from mblair/master

    Here's a grammar fix for the readme.
    tmm1 committed Sep 12, 2011
  2. README grammar fix

    mblair committed Sep 12, 2011
Commits on Sep 10, 2011
  1. bump rake-compiler dependency

    tmm1 committed Sep 10, 2011
Commits on Sep 9, 2011
  1. Merge pull request #232 from dturnbull/master

    return self
    tmm1 committed Sep 9, 2011
Commits on Sep 7, 2011
Commits on Sep 5, 2011
  1. fix code samples in iterator docs

    tmm1 committed Sep 5, 2011
Commits on Sep 1, 2011
  1. Merge pull request #246 from rtomayko/popen-pause

    Add pause/resume support for PipeDescriptor
    tmm1 committed Sep 1, 2011
  2. pull pause/resume logic down into EventableDescriptor

    Fixes pause/resume support on PipeDescriptor and possibly other
    connection types. See #245 for more info.
    tmm1 committed with rtomayko Sep 1, 2011
Commits on Aug 25, 2011
  1. Merge pull request #242 from vishnugopal/never-close-stdin-out-err

    Never close STDIN, STDOUT and STDERR (i.e. only close when fd > 2) Should
    tmm1 committed Aug 25, 2011