nio4r 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.travis.yml +13 -0
- data/CHANGES.md +30 -0
- data/Gemfile +2 -1
- data/README.md +9 -2
- data/ext/libev/Changes +57 -0
- data/ext/libev/LICENSE +2 -1
- data/ext/libev/README +8 -8
- data/ext/libev/ev.c +541 -214
- data/ext/libev/ev.h +106 -100
- data/ext/libev/ev_epoll.c +1 -1
- data/ext/libev/ev_kqueue.c +20 -4
- data/ext/libev/ev_vars.h +15 -16
- data/ext/libev/ev_win32.c +12 -2
- data/ext/libev/ev_wrap.h +162 -160
- data/ext/nio4r/libev.h +2 -1
- data/ext/nio4r/org/nio4r/Nio4r.java +15 -6
- data/ext/nio4r/selector.c +27 -8
- data/lib/nio/selector.rb +13 -14
- data/lib/nio/version.rb +1 -1
- data/lib/nio.rb +4 -2
- data/nio4r.gemspec +8 -2
- data/spec/nio/acceptables_spec.rb +2 -0
- data/spec/nio/monitor_spec.rb +2 -2
- data/spec/nio/selectables/pipe_spec.rb +6 -1
- data/spec/nio/selectables/tcp_socket_spec.rb +3 -3
- data/spec/nio/selector_spec.rb +26 -9
- data/spec/spec_helper.rb +4 -1
- data/spec/support/selectable_examples.rb +0 -1
- metadata +29 -22
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 3f003ce03885c6b5029c3adac1440958302ad814
|
|
4
|
+
data.tar.gz: 12ba4fbebda0e4b470627eeaefe39650651ac5dc
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: e4f9306f866dce0e04dd5f5243f757f67ba05c289036f46b0fbd5693e58a2bc094de39112a46f7080269ce8c9ff6b7e3efa61c143c14489831739b917b8b203b
|
|
7
|
+
data.tar.gz: 290986bcc1442b86a029ce860ee5f48607f7434776866302ceb66ce113020adbc836bd4e684ca71ebf9da276ad8d7781abbcc63dd7683df4494e165832f78d42
|
data/.travis.yml
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
rvm:
|
|
2
2
|
- 1.8.7
|
|
3
3
|
- 1.9.3
|
|
4
|
+
- 2.0.0
|
|
4
5
|
- ree
|
|
5
6
|
- ruby-head
|
|
6
7
|
- jruby-18mode
|
|
@@ -8,3 +9,15 @@ rvm:
|
|
|
8
9
|
- jruby-head
|
|
9
10
|
- rbx-18mode
|
|
10
11
|
- rbx-19mode
|
|
12
|
+
|
|
13
|
+
matrix:
|
|
14
|
+
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
|
+
- rvm: ruby-head
|
|
18
|
+
- rvm: jruby-head
|
|
19
|
+
- rvm: rbx-18mode # sure would like to get this fixed!
|
|
20
|
+
- rvm: rbx-19mode # ditto
|
|
21
|
+
|
|
22
|
+
notifications:
|
|
23
|
+
irc: "irc.freenode.org#celluloid"
|
data/CHANGES.md
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
|
+
0.5.0 (2013-08-06)
|
|
2
|
+
------------------
|
|
3
|
+
* Fix segv when attempting to register to a closed selector
|
|
4
|
+
* Fix Windows support on Ruby 2.0.0
|
|
5
|
+
* Upgrade to libev 4.15
|
|
6
|
+
|
|
7
|
+
0.4.6 (2013-05-27)
|
|
8
|
+
------------------
|
|
9
|
+
* Fix for JRuby on Windows
|
|
10
|
+
|
|
11
|
+
0.4.5
|
|
12
|
+
-----
|
|
13
|
+
* Fix botched gem release
|
|
14
|
+
|
|
15
|
+
0.4.4
|
|
16
|
+
-----
|
|
17
|
+
* Fix return values for Selector_synchronize and Selector_unlock
|
|
18
|
+
|
|
19
|
+
0.4.3
|
|
20
|
+
-----
|
|
21
|
+
* REALLY have thread synchronization when closing selectors ;)
|
|
22
|
+
|
|
23
|
+
0.4.2
|
|
24
|
+
-----
|
|
25
|
+
* Attempt to work around packaging problems with bundler-api o_O
|
|
26
|
+
|
|
27
|
+
0.4.1
|
|
28
|
+
-----
|
|
29
|
+
* Thread synchronization when closing selectors
|
|
30
|
+
|
|
1
31
|
0.4.0
|
|
2
32
|
-----
|
|
3
33
|
* OpenSSL::SSL::SSLSocket support
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
New IO for Ruby
|
|
2
2
|
===============
|
|
3
|
-
[](http://rubygems.org/gems/nio4r)
|
|
5
|
+
[](http://travis-ci.org/celluloid/nio4r)
|
|
7
|
+
[](https://codeclimate.com/github/celluloid/nio4r)
|
|
9
|
+
[](https://coveralls.io/r/celluloid/nio4r)
|
|
4
11
|
|
|
5
12
|
When it comes to managing many IO objects on Ruby, there aren't a whole lot of
|
|
6
13
|
options. The most powerful API Ruby itself gives you is Kernel.select, and
|
|
@@ -121,7 +128,7 @@ selector.deregister(reader)
|
|
|
121
128
|
|
|
122
129
|
Monitors provide methods which let you introspect on why a particular IO
|
|
123
130
|
object was selected. These methods are not thread safe unless you are holding
|
|
124
|
-
the selector lock (i.e. if you're in a block
|
|
131
|
+
the selector lock (i.e. if you're in a block passed to #select). Only use them
|
|
125
132
|
if you aren't concerned with thread safety, or you're within a #select
|
|
126
133
|
block:
|
|
127
134
|
|
data/ext/libev/Changes
CHANGED
|
@@ -2,6 +2,63 @@ Revision history for libev, a high-performance and full-featured event loop.
|
|
|
2
2
|
|
|
3
3
|
TODO: ev_loop_wakeup
|
|
4
4
|
TODO: EV_STANDALONE == NO_HASSEL (do not use clock_gettime in ev_standalone)
|
|
5
|
+
TODO: faq, process a thing in each iteration
|
|
6
|
+
TODO: dbeugging tips, ev_verify, ev_init twice
|
|
7
|
+
TODO: ev_break for immediate exit (EVBREAK_NOW?)
|
|
8
|
+
TODO: ev_feed_child_event
|
|
9
|
+
TODO: document the special problem of signals around fork.
|
|
10
|
+
TODO: store pid for each signal
|
|
11
|
+
TODO: document file descriptor usage per loop
|
|
12
|
+
TODO: store loop pid_t and compare isndie signal handler,store 1 for same, 2 for differign pid, clean up in loop_fork
|
|
13
|
+
TODO: embed watchers need updating when fd changes
|
|
14
|
+
TODO: document portbaility requirements for atomic pointer access
|
|
15
|
+
|
|
16
|
+
4.15 Fri Mar 1 12:04:50 CET 2013
|
|
17
|
+
- destroying a non-default loop would stop the global waitpid
|
|
18
|
+
watcher (Denis Bilenko).
|
|
19
|
+
- queueing pending watchers of higher priority from a watcher now invokes
|
|
20
|
+
them in a timely fashion (reported by Denis Bilenko).
|
|
21
|
+
- add throw() to all libev functions that cannot throw exceptions, for
|
|
22
|
+
further code size decrease when compiling for C++.
|
|
23
|
+
- add throw () to callbacks that must not throw exceptions (allocator,
|
|
24
|
+
syserr, loop acquire/release, periodic reschedule cbs).
|
|
25
|
+
- fix event_base_loop return code, add event_get_callback, event_base_new,
|
|
26
|
+
event_base_get_method calls to improve libevent 1.x emulation and add
|
|
27
|
+
some libevent 2.x functionality (based on a patch by Jeff Davey).
|
|
28
|
+
- add more memory fences to fix a bug reported by Jeff Davey. Better
|
|
29
|
+
be overfenced than underprotected.
|
|
30
|
+
- ev_run now returns a boolean status (true meaning watchers are
|
|
31
|
+
still active).
|
|
32
|
+
- ev_once: undef EV_ERROR in ev_kqueue.c, to avoid clashing with
|
|
33
|
+
libev's EV_ERROR (reported by 191919).
|
|
34
|
+
- (ecb) add memory fence support for xlC (Darin McBride).
|
|
35
|
+
- (ecb) add memory fence support for gcc-mips (Anton Kirilov).
|
|
36
|
+
- (ecb) add memory fence support for gcc-alpha (Christian Weisgerber).
|
|
37
|
+
- work around some kernels losing file descriptors by leaking
|
|
38
|
+
the kqueue descriptor in the child.
|
|
39
|
+
- work around linux inotify not reporting IN_ATTRIB changes for directories
|
|
40
|
+
in many cases.
|
|
41
|
+
- include sys/syscall.h instead of plain syscall.h.
|
|
42
|
+
- check for io watcher loops in ev_verify, check for the most
|
|
43
|
+
common reported usage bug in ev_io_start.
|
|
44
|
+
- chose socket vs. WSASocket at compiletime using EV_USE_WSASOCKET.
|
|
45
|
+
- always use WSASend/WSARecv directly on windows, hoping that this
|
|
46
|
+
works in all cases (unlike read/write/send/recv...).
|
|
47
|
+
- try to detect signals around a fork faster (test program by
|
|
48
|
+
Denis Bilenko).
|
|
49
|
+
- work around recent glibc versions that leak memory in realloc.
|
|
50
|
+
- rename ev::embed::set to ev::embed::set_embed to avoid clashing
|
|
51
|
+
the watcher base set (loop) method.
|
|
52
|
+
- rewrite the async/signal pipe logic to always keep a valid fd, which
|
|
53
|
+
simplifies (and hopefuly correctifies :) the race checking
|
|
54
|
+
on fork, at the cost of one extra fd.
|
|
55
|
+
- add fat, msdos, jffs2, ramfs, ntfs and btrfs to the list of
|
|
56
|
+
inotify-supporting filesystems.
|
|
57
|
+
- move orig_CFLAGS assignment to after AC_INIT, as newer autoconf
|
|
58
|
+
versions ignore it before
|
|
59
|
+
(https://bugzilla.redhat.com/show_bug.cgi?id=908096).
|
|
60
|
+
- add some untested android support.
|
|
61
|
+
- enum expressions must be of type int (reported by Juan Pablo L).
|
|
5
62
|
|
|
6
63
|
4.11 Sat Feb 4 19:52:39 CET 2012
|
|
7
64
|
- INCOMPATIBLE CHANGE: ev_timer_again now clears the pending status, as
|
data/ext/libev/LICENSE
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
All files in libev are
|
|
1
|
+
All files in libev are
|
|
2
|
+
Copyright (c)2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann.
|
|
2
3
|
|
|
3
4
|
Redistribution and use in source and binary forms, with or without
|
|
4
5
|
modification, are permitted provided that the following conditions are
|
data/ext/libev/README
CHANGED
|
@@ -24,23 +24,23 @@ ABOUT
|
|
|
24
24
|
- relative timers/timeouts (handle time jumps).
|
|
25
25
|
- fast intra-thread communication between multiple
|
|
26
26
|
event loops (with optional fast linux eventfd backend).
|
|
27
|
-
- extremely easy to embed
|
|
28
|
-
|
|
27
|
+
- extremely easy to embed (fully documented, no dependencies,
|
|
28
|
+
autoconf supported but optional).
|
|
29
|
+
- very small codebase, no bloated library, simple code.
|
|
29
30
|
- fully extensible by being able to plug into the event loop,
|
|
30
31
|
integrate other event loops, integrate other event loop users.
|
|
31
32
|
- very little memory use (small watchers, small event loop data).
|
|
32
33
|
- optional C++ interface allowing method and function callbacks
|
|
33
34
|
at no extra memory or runtime overhead.
|
|
34
35
|
- optional Perl interface with similar characteristics (capable
|
|
35
|
-
of running Glib/Gtk2 on libev
|
|
36
|
-
libadns).
|
|
36
|
+
of running Glib/Gtk2 on libev).
|
|
37
37
|
- support for other languages (multiple C++ interfaces, D, Ruby,
|
|
38
38
|
Python) available from third-parties.
|
|
39
39
|
|
|
40
|
-
Examples of programs that embed libev: the EV perl module,
|
|
41
|
-
rxvt-unicode, gvpe (GNU Virtual Private Ethernet), the
|
|
42
|
-
server (http://www.deliantra.net/), Rubinius (a
|
|
43
|
-
VM), the Ebb web server, the Rev event toolkit.
|
|
40
|
+
Examples of programs that embed libev: the EV perl module, node.js,
|
|
41
|
+
auditd, rxvt-unicode, gvpe (GNU Virtual Private Ethernet), the
|
|
42
|
+
Deliantra MMORPG server (http://www.deliantra.net/), Rubinius (a
|
|
43
|
+
next-generation Ruby VM), the Ebb web server, the Rev event toolkit.
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
CONTRIBUTORS
|