nio4r 0.5.0-java → 1.0.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +4 -10
- data/CHANGES.md +6 -0
- data/README.md +36 -32
- data/ext/nio4r/selector.c +1 -1
- data/lib/nio/selector.rb +1 -1
- data/lib/nio/version.rb +1 -1
- data/logo.png +0 -0
- metadata +7 -14
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3c1b409705da298c31651415f6214ef8708997ae
|
4
|
+
data.tar.gz: f942e09795261ce8ddfc06966d99e6592cb096a3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 379717946a09662a3b8ef9aee2e921c5f0a92cc2a570c06bf70c2dade4e38b38ce6e3d026bd4ec86419ece1f2a5a0fe2a50d1407bfa744bb6c7c708b1e39af1a
|
7
|
+
data.tar.gz: 8b7b04f12f3910aa7c70ca064d7a7ea527c62fbf4ef5a66126f8e0a50c7be1e914ece94e210bd739592b4b909ec1618e4bd4b0ba911b6fecfbedbae04d82d82f
|
data/.travis.yml
CHANGED
@@ -1,23 +1,17 @@
|
|
1
1
|
rvm:
|
2
|
-
- 1.8.7
|
3
2
|
- 1.9.3
|
4
3
|
- 2.0.0
|
5
|
-
-
|
4
|
+
- 2.1.0
|
6
5
|
- ruby-head
|
7
|
-
- jruby
|
8
|
-
- jruby-19mode
|
6
|
+
- jruby
|
9
7
|
- jruby-head
|
10
|
-
- rbx
|
11
|
-
- rbx-19mode
|
8
|
+
- rbx
|
12
9
|
|
13
10
|
matrix:
|
14
11
|
allow_failures:
|
15
|
-
- rvm: 1.8.7 # not sure why 1.8 isn't passing, but it's dead
|
16
|
-
- rvm: ree # also dead
|
17
12
|
- rvm: ruby-head
|
18
13
|
- rvm: jruby-head
|
19
|
-
- rvm: rbx
|
20
|
-
- rvm: rbx-19mode # ditto
|
14
|
+
- rvm: rbx
|
21
15
|
|
22
16
|
notifications:
|
23
17
|
irc: "irc.freenode.org#celluloid"
|
data/CHANGES.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
1.0.0 (2014-01-14)
|
2
|
+
------------------
|
3
|
+
* Have Selector#register obtain the actual IO from a Monitor object
|
4
|
+
because Monitor#initialize might convert it.
|
5
|
+
* Drop 1.8 support
|
6
|
+
|
1
7
|
0.5.0 (2013-08-06)
|
2
8
|
------------------
|
3
9
|
* Fix segv when attempting to register to a closed selector
|
data/README.md
CHANGED
@@ -1,44 +1,48 @@
|
|
1
|
-
|
1
|
+
![nio4r](https://raw.github.com/celluloid/nio4r/master/logo.png)
|
2
2
|
===============
|
3
|
-
[![Gem
|
4
|
-
|
5
|
-
[![
|
6
|
-
Status](https://
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
API.
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
*
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/nio4r.png)](http://rubygems.org/gems/nio4r)
|
4
|
+
[![Build Status](https://secure.travis-ci.org/celluloid/nio4r.png?branch=master)](http://travis-ci.org/celluloid/nio4r)
|
5
|
+
[![Code Climate](https://codeclimate.com/github/celluloid/nio4r.png)](https://codeclimate.com/github/celluloid/nio4r)
|
6
|
+
[![Coverage Status](https://coveralls.io/repos/celluloid/nio4r/badge.png?branch=master)](https://coveralls.io/r/celluloid/nio4r)
|
7
|
+
|
8
|
+
nio4r: New IO for Ruby.
|
9
|
+
|
10
|
+
nio4r provides an abstract, cross-platform stateful I/O selector API for Ruby.
|
11
|
+
I/O selectors are the heart of "reactor"-based event loops, and monitor
|
12
|
+
multiple I/O objects for various types of readiness, e.g. ready for reading or
|
13
|
+
writing.
|
14
|
+
|
15
|
+
The most similar API provided by Ruby today is Kernel.select, however the
|
16
|
+
select API requires you to pass in arrays of all of the I/O objects you're
|
17
|
+
interested in every time. nio4r provides a more object-oriented API that lets
|
18
|
+
you register I/O objects with a selector then handle them when they're selected
|
19
|
+
for various types of events.
|
20
|
+
|
21
|
+
nio4r is modeled after the Java NIO API, but simplified for ease-of-use.
|
22
|
+
|
23
|
+
Its goals are:
|
24
|
+
|
25
|
+
* Expose high-level interfaces for stateful IO selectors
|
26
|
+
* Keep the API small to maximize both portability and performance across many
|
27
|
+
different OSes and Ruby VMs
|
26
28
|
* Provide inherently thread-safe facilities for working with IO objects
|
27
29
|
|
30
|
+
[Celluloid::IO](https://github.com/celluloid/celluloid-io) uses nio4r to
|
31
|
+
monitor multiple IO objects from a single Celluloid actor.
|
32
|
+
|
28
33
|
Supported Platforms
|
29
34
|
-------------------
|
30
35
|
|
31
36
|
nio4r is known to work on the following Ruby implementations:
|
32
37
|
|
33
|
-
* MRI/YARV 1.
|
34
|
-
*
|
35
|
-
*
|
36
|
-
* Rubinius 1.x/2.0
|
38
|
+
* MRI/YARV 1.9.3, 2.0.0, 2.1.0
|
39
|
+
* JRuby 1.7.x
|
40
|
+
* Rubinius 2.x
|
37
41
|
* A pure Ruby implementation based on Kernel.select is also provided
|
38
42
|
|
39
43
|
Platform notes:
|
40
44
|
|
41
|
-
* MRI/YARV and Rubinius implement
|
45
|
+
* MRI/YARV and Rubinius implement nio4r with a C extension based on libev,
|
42
46
|
which provides a high performance binding to native IO APIs
|
43
47
|
* JRuby uses a Java extension based on the high performance Java NIO subsystem
|
44
48
|
* A pure Ruby implementation is also provided for Ruby implementations which
|
@@ -177,8 +181,8 @@ however this is not the case today.
|
|
177
181
|
License
|
178
182
|
-------
|
179
183
|
|
180
|
-
Copyright (c)
|
184
|
+
Copyright (c) 2014 Tony Arcieri. Distributed under the MIT License. See
|
181
185
|
LICENSE.txt for further details.
|
182
186
|
|
183
|
-
Includes libev. Copyright (C)2007-09 Marc Alexander Lehmann. Distributed
|
184
|
-
the BSD license. See ext/libev/LICENSE for details.
|
187
|
+
Includes libev 4.15. Copyright (C)2007-09 Marc Alexander Lehmann. Distributed
|
188
|
+
under the BSD license. See ext/libev/LICENSE for details.
|
data/ext/nio4r/selector.c
CHANGED
@@ -222,7 +222,7 @@ static VALUE NIO_Selector_register_synchronized(VALUE *args)
|
|
222
222
|
monitor_args[2] = self;
|
223
223
|
|
224
224
|
monitor = rb_class_new_instance(3, monitor_args, cNIO_Monitor);
|
225
|
-
rb_hash_aset(selectables, io, monitor);
|
225
|
+
rb_hash_aset(selectables, rb_funcall(monitor, rb_intern("io"), 0), monitor);
|
226
226
|
|
227
227
|
return monitor;
|
228
228
|
}
|
data/lib/nio/selector.rb
CHANGED
data/lib/nio/version.rb
CHANGED
data/logo.png
ADDED
Binary file
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nio4r
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.0
|
6
5
|
platform: java
|
7
6
|
authors:
|
8
7
|
- Tony Arcieri
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-01-15 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rake-compiler
|
@@ -18,13 +17,11 @@ dependencies:
|
|
18
17
|
- - '>='
|
19
18
|
- !ruby/object:Gem::Version
|
20
19
|
version: '0'
|
21
|
-
none: false
|
22
20
|
requirement: !ruby/object:Gem::Requirement
|
23
21
|
requirements:
|
24
22
|
- - '>='
|
25
23
|
- !ruby/object:Gem::Version
|
26
24
|
version: '0'
|
27
|
-
none: false
|
28
25
|
prerelease: false
|
29
26
|
type: :development
|
30
27
|
- !ruby/object:Gem::Dependency
|
@@ -34,13 +31,11 @@ dependencies:
|
|
34
31
|
- - '>='
|
35
32
|
- !ruby/object:Gem::Version
|
36
33
|
version: '0'
|
37
|
-
none: false
|
38
34
|
requirement: !ruby/object:Gem::Requirement
|
39
35
|
requirements:
|
40
36
|
- - '>='
|
41
37
|
- !ruby/object:Gem::Version
|
42
38
|
version: '0'
|
43
|
-
none: false
|
44
39
|
prerelease: false
|
45
40
|
type: :development
|
46
41
|
- !ruby/object:Gem::Dependency
|
@@ -50,13 +45,11 @@ dependencies:
|
|
50
45
|
- - '>='
|
51
46
|
- !ruby/object:Gem::Version
|
52
47
|
version: '0'
|
53
|
-
none: false
|
54
48
|
requirement: !ruby/object:Gem::Requirement
|
55
49
|
requirements:
|
56
50
|
- - '>='
|
57
51
|
- !ruby/object:Gem::Version
|
58
52
|
version: '0'
|
59
|
-
none: false
|
60
53
|
prerelease: false
|
61
54
|
type: :development
|
62
55
|
description: New IO for Ruby
|
@@ -101,6 +94,8 @@ files:
|
|
101
94
|
- lib/nio/monitor.rb
|
102
95
|
- lib/nio/selector.rb
|
103
96
|
- lib/nio/version.rb
|
97
|
+
- lib/nio4r_ext.jar
|
98
|
+
- logo.png
|
104
99
|
- nio4r.gemspec
|
105
100
|
- spec/nio/acceptables_spec.rb
|
106
101
|
- spec/nio/monitor_spec.rb
|
@@ -113,9 +108,9 @@ files:
|
|
113
108
|
- spec/support/selectable_examples.rb
|
114
109
|
- tasks/extension.rake
|
115
110
|
- tasks/rspec.rake
|
116
|
-
- lib/nio4r_ext.jar
|
117
111
|
homepage: https://github.com/celluloid/nio4r
|
118
112
|
licenses: []
|
113
|
+
metadata: {}
|
119
114
|
post_install_message:
|
120
115
|
rdoc_options: []
|
121
116
|
require_paths:
|
@@ -125,18 +120,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
125
120
|
- - '>='
|
126
121
|
- !ruby/object:Gem::Version
|
127
122
|
version: '0'
|
128
|
-
none: false
|
129
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
130
124
|
requirements:
|
131
125
|
- - '>='
|
132
126
|
- !ruby/object:Gem::Version
|
133
127
|
version: '0'
|
134
|
-
none: false
|
135
128
|
requirements: []
|
136
129
|
rubyforge_project:
|
137
|
-
rubygems_version:
|
130
|
+
rubygems_version: 2.2.1
|
138
131
|
signing_key:
|
139
|
-
specification_version:
|
132
|
+
specification_version: 4
|
140
133
|
summary: NIO provides a high performance selector API for monitoring IO objects
|
141
134
|
test_files:
|
142
135
|
- spec/nio/acceptables_spec.rb
|