cool.io 1.4.2 → 1.4.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d730937f1acab28544c904ae2952ed826e8b475
4
- data.tar.gz: 728a5a46fa65974a989c38f43249b43eca62fda2
3
+ metadata.gz: befae475513e70b03f1860baa2564540ee9bbdef
4
+ data.tar.gz: 1f492b338548bdd661a008d1621213b7d59ffe86
5
5
  SHA512:
6
- metadata.gz: ff24cd2f7ae57c9f67f70fa7537640ae5e627f274a281eb9888f103ecbb79c330a672678ed83699f420b09259598f57bebfb9051bcf7c31e831cf57d63c53741
7
- data.tar.gz: bbf3ecbac1d11057ac86a7cf5d5b1fa7a018249e19f9d780f48da9d6e401d366acdde024fccbaec928cd56308e60f564066debc0c2d48548989d94a243e1333b
6
+ metadata.gz: 3cdb6490f8a0f81e6f07fe00b4aa7a3e0152f71e8727e6779b8445c970e44c68314011c34101a19ea3ffbae4d2ca5d1e7f3eca3962e10ac780428d7e27ab0a42
7
+ data.tar.gz: 985f43951a363925d5da9c7472ec59564d07b317697cefc0a3aae6d4110e686005107616fd6ea723a9a480da749ff844d309545c0aca3073e18d926394272dd0
@@ -1,10 +1,13 @@
1
1
  language: ruby
2
2
 
3
+ sudo: false
4
+
3
5
  rvm:
4
6
  - 1.9.3
5
7
  - 2.0
6
8
  - 2.1
7
9
  - 2.2
10
+ - 2.3.0
8
11
  - ruby-head
9
12
  - rbx
10
13
 
data/CHANGES.md CHANGED
@@ -1,3 +1,9 @@
1
+ 1.4.3
2
+ -----
3
+
4
+ * Use accept instead of accept_nonblock on Windows to avoid thundering held problem
5
+ * Fix compilation error on Solaris and Ruby 2.3.0
6
+
1
7
  1.4.2
2
8
  -----
3
9
 
@@ -0,0 +1,18 @@
1
+ ---
2
+ install:
3
+ - SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
4
+ - ruby --version
5
+ - gem --version
6
+ - bundle install
7
+ build: off
8
+ test_script:
9
+ - bundle exec rake -rdevkit
10
+
11
+ environment:
12
+ matrix:
13
+ - ruby_version: "200"
14
+ - ruby_version: "200-x64"
15
+ - ruby_version: "21"
16
+ - ruby_version: "21-x64"
17
+ - ruby_version: "22"
18
+ - ruby_version: "22-x64"
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
  s.require_paths = ["lib"]
24
24
 
25
25
  s.add_development_dependency "rake-compiler", "~> 0.9.5"
26
- s.add_development_dependency "rake-compiler-dock", "~> 0.4.3"
26
+ s.add_development_dependency "rake-compiler-dock", "~> 0.5.0"
27
27
  s.add_development_dependency "rspec", ">= 2.13.0"
28
28
  s.add_development_dependency "rdoc", ">= 3.6.0"
29
29
  end
@@ -42,6 +42,11 @@ else
42
42
  end
43
43
  end
44
44
 
45
+ if RUBY_PLATFORM =~ /solaris/
46
+ # libev/ev.c requires NSIG which is undefined if _XOPEN_SOURCE is defined
47
+ $defs << '-D__EXTENSIONS__'
48
+ end
49
+
45
50
  $LIBS << ' ' << libs.join(' ')
46
51
 
47
52
  dir_config('cool.io_ext')
@@ -40,19 +40,31 @@ module Coolio
40
40
  #########
41
41
 
42
42
  # Coolio callback for handling new connections
43
- def on_readable
44
- begin
45
- on_connection @listen_socket.accept_nonblock
46
- rescue Errno::EAGAIN, Errno::ECONNABORTED
47
- # EAGAIN can be triggered here if the socket is shared between
48
- # multiple processes and a thundering herd is woken up to accept
49
- # one connection, only one process will get the connection and
50
- # the others will be awoken.
51
- # ECONNABORTED is documented in accept() manpages but modern TCP
52
- # stacks with syncookies and/or accept()-filtering for DoS
53
- # protection do not see it. In any case this error is harmless
54
- # and we should instead spend our time with clients that follow
55
- # through on connection attempts.
43
+ unless RUBY_PLATFORM =~ /mingw|mswin/
44
+ def on_readable
45
+ begin
46
+ on_connection @listen_socket.accept_nonblock
47
+ rescue Errno::EAGAIN, Errno::ECONNABORTED
48
+ # EAGAIN can be triggered here if the socket is shared between
49
+ # multiple processes and a thundering herd is woken up to accept
50
+ # one connection, only one process will get the connection and
51
+ # the others will be awoken.
52
+ # ECONNABORTED is documented in accept() manpages but modern TCP
53
+ # stacks with syncookies and/or accept()-filtering for DoS
54
+ # protection do not see it. In any case this error is harmless
55
+ # and we should instead spend our time with clients that follow
56
+ # through on connection attempts.
57
+ end
58
+ end
59
+ else
60
+ def on_readable
61
+ begin
62
+ # In Windows, accept_nonblock() with multiple processes
63
+ # causes thundering herd problem.
64
+ # To avoid this, we need to use accept().
65
+ on_connection @listen_socket.accept
66
+ rescue Errno::EAGAIN, Errno::ECONNABORTED
67
+ end
56
68
  end
57
69
  end
58
70
  end
@@ -1,5 +1,5 @@
1
1
  module Coolio
2
- VERSION = "1.4.2"
2
+ VERSION = "1.4.3"
3
3
 
4
4
  def self.version
5
5
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cool.io
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Arcieri
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-11-16 00:00:00.000000000 Z
12
+ date: 2016-01-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake-compiler
@@ -31,14 +31,14 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 0.4.3
34
+ version: 0.5.0
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 0.4.3
41
+ version: 0.5.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rspec
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -86,6 +86,7 @@ files:
86
86
  - LICENSE
87
87
  - README.md
88
88
  - Rakefile
89
+ - appveyor.yml
89
90
  - cool.io.gemspec
90
91
  - examples/callbacked_echo_server.rb
91
92
  - examples/dslified_echo_client.rb