3838### Supported Ruby versions
3939
4040MRI 1.9.3, 2.0, 2.1, JRuby (1.9 mode), and Rubinius 2.x are supported.
41- Although native code is used for performance optimizations on some platforms, all functionality
42- is available in pure Ruby. This gem should be fully compatible with any interpreter that is
43- compliant with Ruby 1.9.3 or newer.
41+ This gem should be fully compatible with any interpreter that is compliant with Ruby 1.9.3 or newer.
4442
4543## Features & Documentation
4644
@@ -96,30 +94,7 @@ Lower-level abstractions mainly used as building blocks.
9694* [ thread-local variables] ( http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/ThreadLocalVar.html )
9795* [ software transactional memory] ( ./doc/tvar.md ) (TVar)
9896
99-
100-
101- ## Installing and Building
102-
103- This gem includes several platform-specific optimizations. To reduce the possibility of
104- compilation errors, we provide pre-compiled gem packages for several platforms as well
105- as a pure-Ruby build. Installing the gem should be no different than installing any other
106- Rubygems-hosted gem. Rubygems will automatically detect your platform and install the
107- appropriate pre-compiled build. You should never see Rubygems attempt to compile the gem
108- on installation. Additionally, to ensure compatability with the largest possible number
109- of Ruby interpreters, the C extensions will * never* load under any Ruby other than MRI,
110- even when installed.
111-
112- The following gem builds will be built at every release:
113-
114- * concurrent-ruby-x.y.z.gem (pure Ruby)
115- * concurrent-ruby-x.y.z-java.gem (JRuby)
116- * concurrent-ruby-x.y.z-x86-linux.gem (Linux 32-bit)
117- * concurrent-ruby-x.y.z-x86_64-linux.gem (Linux 64-bit)
118- * concurrent-ruby-x.y.z-x86-mingw32.gem (Windows 32-bit)
119- * concurrent-ruby-x.y.z-x64-mingw32.gem (Windows 64-bit)
120- * concurrent-ruby-x.y.z-x86-solaris-2.11.gem (Solaris)
121-
122- ### Installing
97+ ## Installing
12398
12499``` shell
125100gem install concurrent-ruby
@@ -133,31 +108,28 @@ gem 'concurrent-ruby'
133108
134109and run ` bundle install ` from your shell.
135110
136- ### Building
111+ ### Installing Optional C Extensions (MRI)
137112
138- Because we provide pre-compiled gem builds, users should never need to build the gem manually.
139- The build process for this gem is completely automated using open source tools. All of
140- the automation components are available in the [ ruby-concurrency/rake-compiler-dev-box] ( https://github.com/ruby-concurrency/rake-compiler-dev-box )
141- GitHub repository.
113+ For improved performance on MRI a compantion gem with called ` concurrent-ruby-ext ` is provided. When the
114+ extensions are installed ` concurrent-ruby ` will detect their presence and automatically load them.
142115
143- This gem will compile native C code under MRI and native Java code under JRuby. It is
144- also possible to build a pure-Ruby version. All builds have identical functionality.
145- The only difference is performance. Additionally, pure-Ruby classes are always available,
146- even when using the native optimizations. Please see the [ documentation] ( http://ruby-concurrency.github.io/concurrent-ruby/ )
147- for more details.
116+ ``` shell
117+ gem install concurrent-ruby-ext
118+ ```
148119
149- To build and package the gem using MRI or JRuby, install the necessary build dependencies and run :
120+ or add the following line to Gemfile :
150121
151- ``` shell
152- bundle exec rake compile
153- bundle exec rake build
122+ ``` ruby
123+ gem ' concurrent-ruby' - ext
154124```
155125
156- To build and package a pure-Ruby gem, on * any* platform and interpreter
157- (including MRI and JRuby), run:
126+ and run ` bundle install ` from your shell.
158127
159- ``` shell
160- BUILD_PURE_RUBY=' true' bundle exec rake build
128+ In your code make sure you require the extension gem ** before** you require the core gem:
129+
130+ ``` ruby
131+ require ' concurrent_ext'
132+ require ' concurrent'
161133```
162134
163135## Maintainers
0 commit comments