listen 2.6.1 → 2.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fa8f979865ee9df1416e036a6fc2d79624dee8f4
4
- data.tar.gz: ee557dc2c27b50d6dcef4a1194396d9f2525467c
3
+ metadata.gz: 812276687dc4c17d96ced0f45548a4e57cc955bd
4
+ data.tar.gz: 5b56ff60f6ec54a18472406df7e254305efe6017
5
5
  SHA512:
6
- metadata.gz: 76aca75686991d97307b26be669e6b94b89440f87a1698eb9b1508b036fd16db3cfff30cd3fe96616ad935fe858e3d9cc68c7c45606263ba8e083171dd5f5528
7
- data.tar.gz: 27575706c841bc47f8cd32fb40b413fbc211e60291a06a06b1aa36d1e3325608acc42898bb1cf3891e34ea5916456dc305e673286b5066bf5acc7817a4b4daec
6
+ metadata.gz: aa9b862960d220fa996af84fc890514289683f81d4852c08a6b3f2ec2843c0c3044c87a65a38486a4d47d823e874768f51b8c6ceede7cf080e12ef353e8be09d
7
+ data.tar.gz: 67bf684c0d85aa8a5278199f46a950b3c2149f3a4e912db8987cf143eb1e269cbf7c40440849830f28bbb17e61a0c90a9b99aef3398d3445933012c0897a8a53
data/README.md CHANGED
@@ -183,6 +183,10 @@ gem 'rb-kqueue', '>= 0.2' if RbConfig::CONFIG['target_os'] =~ /freebsd/i
183
183
 
184
184
  ### Issues
185
185
 
186
+ Listen traps SIGINT signal to properly finalize listeners. If you plan
187
+ on trapping this signal yourself - make sure to call `Listen.stop` in
188
+ signal handler.
189
+
186
190
  Sometimes OS-specific adapters don't work. :'(
187
191
  Here are some things you could try to avoid forcing polling.
188
192
 
@@ -57,7 +57,11 @@ module Listen
57
57
  def boot_celluloid
58
58
  Celluloid.boot unless Celluloid.running?
59
59
  end
60
-
61
60
  end
62
-
61
+
62
+ unless defined?(JRUBY_VERSION)
63
+ if Signal.list.keys.include?('INT')
64
+ Signal.trap('INT') { Listen.stop }
65
+ end
66
+ end
63
67
  end
@@ -36,7 +36,6 @@ module Listen
36
36
  # for changes. The current thread is not blocked after starting.
37
37
  #
38
38
  def start
39
- _signals_trap
40
39
  _init_actors
41
40
  unpause
42
41
  @stopping = false
@@ -135,13 +134,6 @@ module Listen
135
134
  supervisor.add(adapter_class, as: :adapter, args: self)
136
135
  end
137
136
 
138
- def _signals_trap
139
- return if defined?(JRUBY_VERSION)
140
- if Signal.list.keys.include?('INT')
141
- Signal.trap('INT') { stop }
142
- end
143
- end
144
-
145
137
  def _wait_for_changes
146
138
  loop do
147
139
  break if @stopping || Listen.stopping
@@ -1,3 +1,3 @@
1
1
  module Listen
2
- VERSION = '2.6.1'
2
+ VERSION = '2.6.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: listen
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1
4
+ version: 2.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thibaud Guillaume-Gentil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-25 00:00:00.000000000 Z
11
+ date: 2014-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: celluloid