celluloid-pool 0.20.1 → 0.20.5

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: f5f6a8d9ab58ec7f7a478c66f1dbbf62f2d595b2
4
- data.tar.gz: d5aed4ef75597a859ac44d002773be53101ac266
3
+ metadata.gz: dfd736b472d62a8fc1cd5aaaa17873beacdb3d05
4
+ data.tar.gz: a9714a61ea855ab38211d04fbf1fe91cce9f0ace
5
5
  SHA512:
6
- metadata.gz: 48b29c7f8c4245e533a715db3c34421a5a16582c0a68d95e52a3856a05ae0984cce01f57af0c486b111407a370d1e7abb0057731276e4e02afb4ffa6ebc8d9a9
7
- data.tar.gz: 5ccb418ed3e58a7ae089131382407aa1eaa493480dbbeada96cfe348309507dc0b6fb17e6b04694f1485c134b56e83d647f6a47d0bbf7a109288b1442a843a3c
6
+ metadata.gz: 2e7d0925ca66400297fdc6567cdda442ba7e6d19006ce848051b3a02898a7c8d44e9388e00866d07b39c3a9c74c5154842664833d8b2be2405c3fce4652e820b
7
+ data.tar.gz: 64e23e0a67c53eec4cc2f2745b7e0a5cca4ca2476631a152d0ec7b2a26de993cb491c60d3bff438cb6e79485c4ba909ec0a8a6bfdde06db14fb2588f8a11afe7
data/.env-ci ADDED
@@ -0,0 +1,4 @@
1
+ CELLULOID_SPECS_LOG_STRATEGY=stderr
2
+ CELLULOID_SPECS_LOG_LEVEL=3
3
+ CELLULOID_SPECS_LOG_FILE=log/ci.log
4
+ CELLULOID_SPECS_LOG_SYNC=false
@@ -0,0 +1,4 @@
1
+ CELLULOID_SPECS_LOG_STRATEGY=single
2
+ CELLULOID_SPECS_LOG_FILE=log/test.log
3
+ CELLULOID_SPECS_LOG_LEVEL=0
4
+ CELLULOID_SPECS_LOG_SYNC=true
@@ -1,33 +1,41 @@
1
- script: bundle exec rake
1
+ script: rake ci
2
2
  language: ruby
3
3
  rvm:
4
- - 1.9.3
5
- - 2.2.0
4
+ - rbx-2
6
5
  - jruby
6
+ - 2.2.2
7
+ - 2.2.0
8
+ - 2.1.4
9
+ - 2.0.0
10
+ - 1.9.3
7
11
  - ruby-head
8
12
  - jruby-head
9
- - rbx-2
10
13
 
11
14
  matrix:
12
15
  fast_finish: true
13
16
  allow_failures:
14
- - rvm: rbx-2
17
+ - rvm: 1.9.3
15
18
  - rvm: ruby-head
16
19
  - rvm: jruby-head
17
20
  - env: CELLULOID_BACKPORTED=true
21
+ - env: CELLULOID_BACKPORTED=false CELLULOID_TASK_CLASS=Threaded
22
+ - env: CELLULOID_BACKPORTED=true CELLULOID_TASK_CLASS=Threaded
18
23
 
19
24
  env:
25
+ global:
26
+ - NUMBER_OF_PROCESSORS=4 CELLULOID_CONFIG_FILE=.env-ci
20
27
  matrix:
21
28
  - CELLULOID_BACKPORTED=true
22
29
  - CELLULOID_BACKPORTED=false
23
- global:
24
- - NUMBER_OF_PROCESSORS=2
30
+ - CELLULOID_BACKPORTED=false CELLULOID_TASK_CLASS=Threaded
31
+ - CELLULOID_BACKPORTED=true CELLULOID_TASK_CLASS=Threaded
25
32
 
26
33
  notifications:
27
34
  irc: "irc.freenode.org#celluloid"
28
35
 
29
36
  before_install:
37
+ # Only use 1 job until Travis fixes the rbx --jobs issue.
30
38
  - if [ "$TRAVIS_RUBY_VERSION" == "rbx-2" ] ; then export BUNDLE_JOBS=1 ; else export BUNDLE_JOBS=4; fi
31
39
 
32
40
  sudo: false
33
- install: bundle install --without=development
41
+ install: bundle install --without=development
data/CHANGES.md CHANGED
@@ -1,4 +1,10 @@
1
- 0.8.5 (2015.04.06)
1
+ 0.20.5 (2015-09-30)
2
+ -----
3
+ * Resumed updating changelog. Not much as changed -- mostly keeping version sync with other gems.
4
+ * Revamped test suite, using shared RSpec configuration layer provided by Celluloid itself.
5
+ * Updated gem dependencies provided by Celluloid::Sync... extraneous gems removed, or marked as development dependencies.
6
+
7
+ 0.8.5 (2015-04-06)
2
8
  -----
3
9
  * Initial release of very old code *as gem* separate of Celluloid.
4
- * Implemented `:injections` into `SupervisionGroup::Member` to resolve previous attachment requirements.
10
+ * Implemented `:injections` into `SupervisionGroup::Member` to resolve previous attachment requirements.
data/Rakefile CHANGED
@@ -4,6 +4,6 @@ Dir["tasks/**/*.rake"].each { |task| load task }
4
4
 
5
5
  default_tasks = ["spec"]
6
6
  default_tasks << "rubocop" unless ENV["CI"]
7
- task default: default_tasks
8
7
 
8
+ task default: default_tasks
9
9
  task ci: %w(spec benchmark)
@@ -3,7 +3,7 @@ require File.expand_path("../culture/sync", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = "celluloid-pool"
6
- gem.version = "0.20.1"
6
+ gem.version = "0.20.5"
7
7
  gem.authors = ["Tony Arcieri", "Tim Carey-Smith", "Donovan Keme"]
8
8
  gem.email = ["tony.arcieri@gmail.com", "code@extremist.digital"]
9
9
 
@@ -47,9 +47,9 @@ module Celluloid
47
47
  include Behavior
48
48
 
49
49
  class << self
50
- def pooling_options(config={},mixins={})
51
- combined = { :type => Celluloid::Supervision::Container::Pool }.merge(config).merge(mixins)
52
- combined[:args] = [[:block, :actors, :size, :args].inject({}) { |e,p| e[p] = combined.delete(p) if combined[p]; e }]
50
+ def pooling_options(config={}, mixins={})
51
+ combined = {type: Celluloid::Supervision::Container::Pool}.merge(config).merge(mixins)
52
+ combined[:args] = [[:block, :actors, :size, :args].inject({}) { |e, p| e[p] = combined.delete(p) if combined[p]; e }]
53
53
  combined
54
54
  end
55
55
  end
@@ -64,8 +64,6 @@ module Celluloid
64
64
  @configuration
65
65
  end
66
66
  end
67
-
68
-
69
67
  end
70
68
  end
71
69
  end
@@ -27,7 +27,7 @@ module Celluloid
27
27
  end
28
28
 
29
29
  def __shutdown__
30
- return unless @actors
30
+ return unless defined?(@actors) && @actors
31
31
  # TODO: these can be nil if initializer crashes
32
32
  terminators = @actors.map do |actor|
33
33
  begin
@@ -103,31 +103,27 @@ module Celluloid
103
103
  end
104
104
 
105
105
  def busy_size
106
- @busy.length
106
+ @mutex.synchronize { @busy.length }
107
107
  end
108
108
 
109
109
  def idle_size
110
- @idle.length
110
+ @mutex.synchronize { @idle.length }
111
111
  end
112
112
 
113
113
  def __idle?(actor)
114
- @idle.include? actor
114
+ @mutex.synchronize { @idle.include? actor }
115
115
  end
116
116
 
117
117
  def __busy?(actor)
118
- @busy.include? actor
118
+ @mutex.synchronize { @busy.include? actor }
119
119
  end
120
120
 
121
121
  def __busy
122
- @busy
123
- end
124
-
125
- def __idle
126
- @idle
122
+ @mutex.synchronize { @busy }
127
123
  end
128
124
 
129
- def __idling?
130
- @mutex.synchronize { @idle.empty? }
125
+ def __idle
126
+ @mutex.synchronize { @idle }
131
127
  end
132
128
 
133
129
  def __state(actor)
@@ -140,34 +136,32 @@ module Celluloid
140
136
  def __spawn_actor__
141
137
  actor = @klass.new_link(*@args)
142
138
  @mutex.synchronize { @actors.add(actor) }
139
+ @actors.add(actor)
143
140
  actor
144
141
  end
145
142
 
146
143
  # Provision a new actor ( take it out of idle, move it into busy, and avail it )
147
144
  def __provision_actor__
148
145
  Task.current.guard_warnings = true
149
- while __idling?
150
- # Wait for responses from one of the busy actors
151
- response = exclusive { receive { |msg| msg.is_a?(Internals::Response) } }
152
- Thread.current[:celluloid_actor].handle_message(response)
153
- end
146
+ @mutex.synchronize do
147
+ while @idle.empty?
148
+ # Wait for responses from one of the busy actors
149
+ response = exclusive { receive { |msg| msg.is_a?(Internals::Response) } }
150
+ Thread.current[:celluloid_actor].handle_message(response)
151
+ end
154
152
 
155
- @mutex.synchronize {
156
153
  actor = @idle.shift
157
154
  @busy << actor
158
155
  actor
159
- }
156
+ end
160
157
  end
161
158
 
162
159
  # Spawn a new worker for every crashed one
163
160
  def __crash_handler__(actor, reason)
164
- @mutex.synchronize {
165
- @busy.delete actor
166
- @idle.delete actor
167
- @actors.delete actor
168
- }
161
+ @busy.delete actor
162
+ @idle.delete actor
163
+ @actors.delete actor
169
164
  return unless reason
170
-
171
165
  @idle << __spawn_actor__
172
166
  signal :respawn_complete
173
167
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: celluloid-pool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.1
4
+ version: 0.20.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Arcieri
@@ -10,52 +10,57 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-08-22 00:00:00.000000000 Z
13
+ date: 2015-09-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
17
- type: :runtime
17
+ version_requirements: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - ">="
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
18
23
  prerelease: false
19
24
  requirement: !ruby/object:Gem::Requirement
20
25
  requirements:
21
26
  - - ">="
22
27
  - !ruby/object:Gem::Version
23
28
  version: '0'
29
+ - !ruby/object:Gem::Dependency
30
+ name: nenv
24
31
  version_requirements: !ruby/object:Gem::Requirement
25
32
  requirements:
26
33
  - - ">="
27
34
  - !ruby/object:Gem::Version
28
35
  version: '0'
29
- - !ruby/object:Gem::Dependency
30
- name: nenv
31
- type: :runtime
36
+ type: :development
32
37
  prerelease: false
33
38
  requirement: !ruby/object:Gem::Requirement
34
39
  requirements:
35
40
  - - ">="
36
41
  - !ruby/object:Gem::Version
37
42
  version: '0'
43
+ - !ruby/object:Gem::Dependency
44
+ name: dotenv
38
45
  version_requirements: !ruby/object:Gem::Requirement
39
46
  requirements:
40
47
  - - ">="
41
48
  - !ruby/object:Gem::Version
42
49
  version: '0'
43
- - !ruby/object:Gem::Dependency
44
- name: dotenv
45
- type: :runtime
50
+ type: :development
46
51
  prerelease: false
47
52
  requirement: !ruby/object:Gem::Requirement
48
53
  requirements:
49
54
  - - ">="
50
55
  - !ruby/object:Gem::Version
51
56
  version: '0'
57
+ - !ruby/object:Gem::Dependency
58
+ name: benchmark_suite
52
59
  version_requirements: !ruby/object:Gem::Requirement
53
60
  requirements:
54
61
  - - ">="
55
62
  - !ruby/object:Gem::Version
56
63
  version: '0'
57
- - !ruby/object:Gem::Dependency
58
- name: benchmark_suite
59
64
  type: :development
60
65
  prerelease: false
61
66
  requirement: !ruby/object:Gem::Requirement
@@ -63,13 +68,13 @@ dependencies:
63
68
  - - ">="
64
69
  - !ruby/object:Gem::Version
65
70
  version: '0'
71
+ - !ruby/object:Gem::Dependency
72
+ name: rubocop
66
73
  version_requirements: !ruby/object:Gem::Requirement
67
74
  requirements:
68
75
  - - ">="
69
76
  - !ruby/object:Gem::Version
70
77
  version: '0'
71
- - !ruby/object:Gem::Dependency
72
- name: rubocop
73
78
  type: :development
74
79
  prerelease: false
75
80
  requirement: !ruby/object:Gem::Requirement
@@ -77,13 +82,13 @@ dependencies:
77
82
  - - ">="
78
83
  - !ruby/object:Gem::Version
79
84
  version: '0'
85
+ - !ruby/object:Gem::Dependency
86
+ name: transpec
80
87
  version_requirements: !ruby/object:Gem::Requirement
81
88
  requirements:
82
89
  - - ">="
83
90
  - !ruby/object:Gem::Version
84
91
  version: '0'
85
- - !ruby/object:Gem::Dependency
86
- name: transpec
87
92
  type: :development
88
93
  prerelease: false
89
94
  requirement: !ruby/object:Gem::Requirement
@@ -91,13 +96,13 @@ dependencies:
91
96
  - - ">="
92
97
  - !ruby/object:Gem::Version
93
98
  version: '0'
99
+ - !ruby/object:Gem::Dependency
100
+ name: pry
94
101
  version_requirements: !ruby/object:Gem::Requirement
95
102
  requirements:
96
103
  - - ">="
97
104
  - !ruby/object:Gem::Version
98
105
  version: '0'
99
- - !ruby/object:Gem::Dependency
100
- name: pry
101
106
  type: :development
102
107
  prerelease: false
103
108
  requirement: !ruby/object:Gem::Requirement
@@ -105,13 +110,13 @@ dependencies:
105
110
  - - ">="
106
111
  - !ruby/object:Gem::Version
107
112
  version: '0'
113
+ - !ruby/object:Gem::Dependency
114
+ name: rake
108
115
  version_requirements: !ruby/object:Gem::Requirement
109
116
  requirements:
110
117
  - - ">="
111
118
  - !ruby/object:Gem::Version
112
119
  version: '0'
113
- - !ruby/object:Gem::Dependency
114
- name: rake
115
120
  type: :development
116
121
  prerelease: false
117
122
  requirement: !ruby/object:Gem::Requirement
@@ -119,13 +124,13 @@ dependencies:
119
124
  - - ">="
120
125
  - !ruby/object:Gem::Version
121
126
  version: '0'
127
+ - !ruby/object:Gem::Dependency
128
+ name: rspec
122
129
  version_requirements: !ruby/object:Gem::Requirement
123
130
  requirements:
124
131
  - - ">="
125
132
  - !ruby/object:Gem::Version
126
133
  version: '0'
127
- - !ruby/object:Gem::Dependency
128
- name: rspec
129
134
  type: :development
130
135
  prerelease: false
131
136
  requirement: !ruby/object:Gem::Requirement
@@ -133,13 +138,13 @@ dependencies:
133
138
  - - ">="
134
139
  - !ruby/object:Gem::Version
135
140
  version: '0'
141
+ - !ruby/object:Gem::Dependency
142
+ name: guard-rspec
136
143
  version_requirements: !ruby/object:Gem::Requirement
137
144
  requirements:
138
145
  - - ">="
139
146
  - !ruby/object:Gem::Version
140
147
  version: '0'
141
- - !ruby/object:Gem::Dependency
142
- name: guard-rspec
143
148
  type: :development
144
149
  prerelease: false
145
150
  requirement: !ruby/object:Gem::Requirement
@@ -147,13 +152,13 @@ dependencies:
147
152
  - - ">="
148
153
  - !ruby/object:Gem::Version
149
154
  version: '0'
155
+ - !ruby/object:Gem::Dependency
156
+ name: rspec-retry
150
157
  version_requirements: !ruby/object:Gem::Requirement
151
158
  requirements:
152
159
  - - ">="
153
160
  - !ruby/object:Gem::Version
154
161
  version: '0'
155
- - !ruby/object:Gem::Dependency
156
- name: coveralls
157
162
  type: :development
158
163
  prerelease: false
159
164
  requirement: !ruby/object:Gem::Requirement
@@ -161,41 +166,41 @@ dependencies:
161
166
  - - ">="
162
167
  - !ruby/object:Gem::Version
163
168
  version: '0'
169
+ - !ruby/object:Gem::Dependency
170
+ name: coveralls
164
171
  version_requirements: !ruby/object:Gem::Requirement
165
172
  requirements:
166
173
  - - ">="
167
174
  - !ruby/object:Gem::Version
168
175
  version: '0'
169
- - !ruby/object:Gem::Dependency
170
- name: celluloid
171
176
  type: :development
172
177
  prerelease: false
173
178
  requirement: !ruby/object:Gem::Requirement
174
179
  requirements:
175
180
  - - ">="
176
181
  - !ruby/object:Gem::Version
177
- version: 0.17.1.1
182
+ version: '0'
183
+ - !ruby/object:Gem::Dependency
184
+ name: celluloid
178
185
  version_requirements: !ruby/object:Gem::Requirement
179
186
  requirements:
180
187
  - - ">="
181
188
  - !ruby/object:Gem::Version
182
- version: 0.17.1.1
183
- - !ruby/object:Gem::Dependency
184
- name: celluloid-essentials
189
+ version: 0.17.2
185
190
  type: :development
186
191
  prerelease: false
187
192
  requirement: !ruby/object:Gem::Requirement
188
193
  requirements:
189
194
  - - ">="
190
195
  - !ruby/object:Gem::Version
191
- version: '0'
196
+ version: 0.17.2
197
+ - !ruby/object:Gem::Dependency
198
+ name: celluloid-essentials
192
199
  version_requirements: !ruby/object:Gem::Requirement
193
200
  requirements:
194
201
  - - ">="
195
202
  - !ruby/object:Gem::Version
196
203
  version: '0'
197
- - !ruby/object:Gem::Dependency
198
- name: celluloid-supervision
199
204
  type: :development
200
205
  prerelease: false
201
206
  requirement: !ruby/object:Gem::Requirement
@@ -203,13 +208,13 @@ dependencies:
203
208
  - - ">="
204
209
  - !ruby/object:Gem::Version
205
210
  version: '0'
211
+ - !ruby/object:Gem::Dependency
212
+ name: celluloid-supervision
206
213
  version_requirements: !ruby/object:Gem::Requirement
207
214
  requirements:
208
215
  - - ">="
209
216
  - !ruby/object:Gem::Version
210
217
  version: '0'
211
- - !ruby/object:Gem::Dependency
212
- name: celluloid-fsm
213
218
  type: :development
214
219
  prerelease: false
215
220
  requirement: !ruby/object:Gem::Requirement
@@ -217,13 +222,13 @@ dependencies:
217
222
  - - ">="
218
223
  - !ruby/object:Gem::Version
219
224
  version: '0'
225
+ - !ruby/object:Gem::Dependency
226
+ name: celluloid-fsm
220
227
  version_requirements: !ruby/object:Gem::Requirement
221
228
  requirements:
222
229
  - - ">="
223
230
  - !ruby/object:Gem::Version
224
231
  version: '0'
225
- - !ruby/object:Gem::Dependency
226
- name: celluloid-extras
227
232
  type: :development
228
233
  prerelease: false
229
234
  requirement: !ruby/object:Gem::Requirement
@@ -231,39 +236,34 @@ dependencies:
231
236
  - - ">="
232
237
  - !ruby/object:Gem::Version
233
238
  version: '0'
239
+ - !ruby/object:Gem::Dependency
240
+ name: celluloid-extras
234
241
  version_requirements: !ruby/object:Gem::Requirement
235
242
  requirements:
236
243
  - - ">="
237
244
  - !ruby/object:Gem::Version
238
245
  version: '0'
239
- - !ruby/object:Gem::Dependency
240
- name: timers
241
- type: :runtime
246
+ type: :development
242
247
  prerelease: false
243
248
  requirement: !ruby/object:Gem::Requirement
244
249
  requirements:
245
250
  - - ">="
246
251
  - !ruby/object:Gem::Version
247
- version: 4.1.1
252
+ version: '0'
253
+ - !ruby/object:Gem::Dependency
254
+ name: timers
248
255
  version_requirements: !ruby/object:Gem::Requirement
249
256
  requirements:
250
257
  - - ">="
251
258
  - !ruby/object:Gem::Version
252
259
  version: 4.1.1
253
- - !ruby/object:Gem::Dependency
254
- name: rspec-logsplit
255
260
  type: :runtime
256
261
  prerelease: false
257
262
  requirement: !ruby/object:Gem::Requirement
258
263
  requirements:
259
264
  - - ">="
260
265
  - !ruby/object:Gem::Version
261
- version: 0.1.2
262
- version_requirements: !ruby/object:Gem::Requirement
263
- requirements:
264
- - - ">="
265
- - !ruby/object:Gem::Version
266
- version: 0.1.2
266
+ version: 4.1.1
267
267
  description: An implementation of an actor pool, based on the Celluloid concurrent
268
268
  object framework.
269
269
  email:
@@ -273,6 +273,8 @@ executables: []
273
273
  extensions: []
274
274
  extra_rdoc_files: []
275
275
  files:
276
+ - ".env-ci"
277
+ - ".env-dev"
276
278
  - ".gitignore"
277
279
  - ".gitmodules"
278
280
  - ".rspec"