diff --git a/LICENSE.MIT b/LICENSE.MIT new file mode 100644 index 0000000..2161828 --- /dev/null +++ b/LICENSE.MIT @@ -0,0 +1,19 @@ +Copyright (c) 2012 Conrad Irwin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..b8ecfdf --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +*in progress* + +LSpace — Safe operation-local storage. + +Global variables are awesome. Unfortunately they become a bit useless when you have +multiple threads because you often want different "global" state per-thread... + +Thread-local variables are even more awesome! Unfortunately they become a bit useless when +you are doing multiple things on the same thread because you often want different +"thread-local" state per operation... + +Operation-local variables are most awesome! + +`LSpace`, named after the Discworld's [L-Space](http://en.wikipedia.org/wiki/Other_dimensions_of_the_Discworld#L-space) +gives you effective, safe operation-local variables. + +It does this by following your operation as it jumps between thread-pools, or fires +callbacks on your event-loop; and makes sure to clean up after itself so that no state +accidentally leaks. + +If you're using this on EventMachine, you should be ready to rock by requiring 'lspace/eventmachine'. +If you've got your own thread-pool, or are doing something fancy, you'll need to do some +manual work. diff --git a/lspace.gemspec b/lspace.gemspec new file mode 100644 index 0000000..3119119 --- /dev/null +++ b/lspace.gemspec @@ -0,0 +1,12 @@ +Gem::Specification.new do |s| + s.name = "lspace" + s.version = "0.1.pre.1" + s.platform = Gem::Platform::RUBY + s.author = "Conrad Irwin" + s.email = "conrad.irwin@gmail.com" + s.homepage = "http://github.com/ConradIrwin/lspace" + s.summary = "Provides local global storage" + s.description = "Provides the convenience of global variables, without the safety concerns." + s.files = `git ls-files`.split("\n") + s.require_path = "lib" +end