ione 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ione/io/io_reactor.rb +25 -10
- data/lib/ione/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db1f327275f2a707826e35fe337e9244e24579d3
|
4
|
+
data.tar.gz: 49634515f2915a2d148fc9bd7261d3995a9c9624
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5573efe1dab6a07649012f63b02dd160023033ba674cb582050d57aaeef4a98cbd00d43651d6d732c3e2d98e32b2cdf838a678836904b9066cf4bb9fda22d806
|
7
|
+
data.tar.gz: 8a0b37f8dde7c69f1f05a4bed764c2c3cb5acdd2460fed882d71dd4bc0c1155983e07a2cf2c2ee76510eff1afd8b4f8496a310b308c7838bf411df4a99b0d4ac
|
data/lib/ione/io/io_reactor.rb
CHANGED
@@ -293,13 +293,21 @@ module Ione
|
|
293
293
|
end
|
294
294
|
|
295
295
|
def cancel_timer(timer_future)
|
296
|
+
timer = nil
|
296
297
|
@lock.lock
|
297
|
-
|
298
|
-
|
299
|
-
|
298
|
+
begin
|
299
|
+
if (timer_pair = @timers.find { |pair| (p = pair[1]) && p.future == timer_future })
|
300
|
+
@timers = @timers.reject { |pair| pair[1].nil? || pair == timer_pair }
|
301
|
+
timer = timer_pair[1]
|
302
|
+
timer_pair[1] = nil
|
303
|
+
end
|
304
|
+
ensure
|
305
|
+
@lock.unlock
|
306
|
+
end
|
307
|
+
if timer
|
308
|
+
timer.fail(CancelledError.new)
|
309
|
+
end
|
300
310
|
nil
|
301
|
-
ensure
|
302
|
-
@lock.unlock
|
303
311
|
end
|
304
312
|
|
305
313
|
def close_sockets
|
@@ -348,11 +356,18 @@ module Ione
|
|
348
356
|
end
|
349
357
|
|
350
358
|
def check_timers!
|
351
|
-
|
352
|
-
timers.each do |pair|
|
353
|
-
if pair[1] && pair[0] <=
|
354
|
-
|
355
|
-
|
359
|
+
now = @clock.now
|
360
|
+
@timers.each do |pair|
|
361
|
+
if pair[1] && pair[0] <= now
|
362
|
+
timer = nil
|
363
|
+
@lock.lock
|
364
|
+
begin
|
365
|
+
timer = pair[1]
|
366
|
+
pair[1] = nil
|
367
|
+
ensure
|
368
|
+
@lock.unlock
|
369
|
+
end
|
370
|
+
timer.fulfill
|
356
371
|
end
|
357
372
|
end
|
358
373
|
end
|
data/lib/ione/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ione
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Theo Hultberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Reactive programming framework for Ruby, painless evented IO, futures
|
14
14
|
and an efficient byte buffer
|