cjbottaro/strand — pull request #7 by lwoggardner (2012-04-18 11:03:42+00:00)
Title: Strand 2?

Finished working on expanding Strand to be more compatible with Thread, particularly by taking the ruby_specs for Thread and associated classes and implementing Strand/Fiber based equivalents.

In addition made Strand a module that behaves like a class, delegating to the standard ruby classes (::Thread,::Mutex,::Queue, ::ConditionVariable) or the Fiber based alternates (now in the Strand::EM namespace) depending on whether the caller is currently in the EventMachine reactor thread.

This allows me to greatly simplify my library (zkruby) that works both inside or outside of eventmachine (clearing up a number of bugs in the process)

Given the rather radical nature of these changes I'm not really expecting them to be pulled into Strand although they are backwards compatible in that the original tests still pass. If you are interested then great, otherwise I'll rename to something else and embed within zkruby or release independently.