eventmachine-le 1.1.5 → 1.1.6
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.
- data/README.md +6 -1
- data/ext/cmain.cpp +1 -0
- data/ext/ed.cpp +2 -0
- data/lib/em/version.rb +1 -1
- data/tests/test_connection_count.rb +21 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
EventMachine-LE (Live Edition) is a branch of [EventMachine](http://github.com/eventmachine/eventmachine) with fixes and more features.
|
4
4
|
|
5
|
-
|
5
|
+
[](https://travis-ci.org/ibc/EventMachine-LE)
|
6
6
|
|
7
7
|
|
8
8
|
## What do you mean by "branch"? ##
|
@@ -49,6 +49,11 @@ for EventMachine, just with additional (and fixed) functionality.
|
|
49
49
|
The list of additions and improvements will grow over time. Currently the following features/fixes have been applied in EventMachine-LE:
|
50
50
|
|
51
51
|
|
52
|
+
### Version 1.1.6
|
53
|
+
|
54
|
+
* Avoid CPU at 100% when calling `close_connection` after a connection has been `unbind`: [ept](https://github.com/ibc/EventMachine-LE/pull/18).
|
55
|
+
|
56
|
+
|
52
57
|
### Version 1.1.5
|
53
58
|
|
54
59
|
* Fix bug when the system time is changed to earlier time (which made EM to eat up the CPU cycle): [commit in EM](https://github.com/eventmachine/eventmachine/commit/1427a2c80c401d841194132a9af15baefd68b5ae).
|
data/ext/cmain.cpp
CHANGED
data/ext/ed.cpp
CHANGED
@@ -220,6 +220,8 @@ EventableDescriptor::ScheduleClose
|
|
220
220
|
|
221
221
|
void EventableDescriptor::ScheduleClose (bool after_writing)
|
222
222
|
{
|
223
|
+
if (IsCloseScheduled())
|
224
|
+
return;
|
223
225
|
MyEventMachine->NumCloseScheduled++;
|
224
226
|
// KEEP THIS SYNCHRONIZED WITH ::IsCloseScheduled.
|
225
227
|
if (after_writing)
|
data/lib/em/version.rb
CHANGED
@@ -30,4 +30,24 @@ class TestConnectionCount < Test::Unit::TestCase
|
|
30
30
|
assert_equal(1, $server_conns)
|
31
31
|
assert_equal(4, $client_conns + $server_conns)
|
32
32
|
end
|
33
|
-
|
33
|
+
|
34
|
+
module DoubleCloseClient
|
35
|
+
def unbind
|
36
|
+
close_connection
|
37
|
+
$num_close_scheduled_1 = EM.num_close_scheduled
|
38
|
+
EM.next_tick do
|
39
|
+
$num_close_scheduled_2 = EM.num_close_scheduled
|
40
|
+
EM.stop
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_num_close_scheduled
|
46
|
+
EM.run {
|
47
|
+
assert_equal(0, EM.num_close_scheduled)
|
48
|
+
EM.connect("127.0.0.1", 9999, DoubleCloseClient) # nothing listening on 9999
|
49
|
+
}
|
50
|
+
assert_equal(1, $num_close_scheduled_1)
|
51
|
+
assert_equal(0, $num_close_scheduled_2)
|
52
|
+
end
|
53
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eventmachine-le
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-
|
14
|
+
date: 2013-10-07 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rake-compiler
|