celluloid-promise 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- M2JmNWExNzczMTEzMjJjMDg4NTY1ZTkzZGU0YTEwZTEzNDI4MzFjYQ==
4
+ MGEzNWUwZjkwZjYyODk0NTJiNTc1M2JhMWY5OGY5MTVhNjJlZDExZA==
5
5
  data.tar.gz: !binary |-
6
- NmNiMzJjYzlkMWFlZWFhZGIwMTNlYjY3YzFmNzFiZDE0N2NiODQxMA==
6
+ YTZiYjk5YzZkOGJlZTRjMTM3NWExYWNjYzA3NmNjNWRkYWYxMzRlYg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZmU0OTUzMDQ3MzZlOTE1ZGU3ZjgxMjE1ZjFjYzU1MWQwNmUzOTkwZmY5NzI4
10
- Y2ViMDcxZTE2ZTNiZjU5NzhlZTk4OTQwZmY1ZGE4MDhlZTA2ZGZiNjRhNmQw
11
- MjllYzU4ZTUwODM2NmYxMWJmMTdkZjRlYzI4MjUwYTk4NGUyYTU=
9
+ YzU1YTU5NTkzYjlhOGE1ZTg2ZDI1NmZmYWNjZjdiOWFjMTQ1MDJlYWI4NmUx
10
+ Y2FiYzc1YjNiMjhjNDZlZjQ3YWRhOTFmZTY2MjhmNjlkMjRlMTg3NTg0MjU5
11
+ MDFlMjFlMWRmZDA3NDk5N2RmNTgzYmExMGQ2ZmY4N2ZhMDViZWE=
12
12
  data.tar.gz: !binary |-
13
- NTYyYjgxOGIwZGY4MDdhZjQ2YTM2YWIyNGY4NWYwN2YwNzAzZThjMWM1MzZm
14
- NmQ0Y2FmZTNhZmNlN2I0ODQ1MDg0NTNhZGE0MjU1MjY4MjU0ZmU4ZjViMzRl
15
- NTZjZDc0NWQxODdlYTMyYjdkOWM3NjYwM2EyODIzZTkwYTcyMzU=
13
+ MjA4ZWMzYjg1MDJiN2Y0YWI1ZTgzOWJhMDE2Y2NlMzQzOGFlNDc3NjI0MDg1
14
+ YTgxMmMyODIzZWMxZDU5MGVmYThlZDVmMTMzMmI5ODc2MTYxNWVjMDZlMzk0
15
+ Njk3OTQwYTlmNjU3MTFlZGZlNzY3ZDk4NmM1NGUzOWZlOWJlN2U=
@@ -78,7 +78,7 @@ module Celluloid
78
78
  # Schedule as we are touching shared state
79
79
  # Everything else is locally scoped
80
80
  #
81
- @reactor.task! do
81
+ @reactor.async.task do
82
82
  pending_array = pending
83
83
 
84
84
  if pending_array.nil?
@@ -122,7 +122,7 @@ module Celluloid
122
122
 
123
123
  callback ||= blk
124
124
 
125
- @reactor.task! do
125
+ @reactor.async.task do
126
126
  if @error
127
127
  if errback.nil?
128
128
  result.resolve(ResolvedPromise.new(@reactor, @response, true))
@@ -164,7 +164,7 @@ module Celluloid
164
164
  #
165
165
  # @param [Object] val constant, message or an object representing the result.
166
166
  def resolve(val = nil)
167
- @reactor.task! do
167
+ @reactor.async.task do
168
168
  if not @pending.nil?
169
169
  callbacks = @pending
170
170
  @pending = nil
@@ -1,6 +1,6 @@
1
1
  module Celluloid
2
2
  module Promise
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
6
6
 
data/spec/promise_spec.rb CHANGED
@@ -127,7 +127,7 @@ describe Celluloid::Q do
127
127
  it "can modify the result of a promise before returning" do
128
128
  @mutex.synchronize {
129
129
  proc { |name|
130
- @defer.task! {
130
+ @defer.async.task {
131
131
  @deferred.resolve("Hello #{name}")
132
132
  }
133
133
  @promise.then(proc {|result|
@@ -262,9 +262,9 @@ describe Celluloid::Q do
262
262
  @finish.call
263
263
  }, @default_fail)
264
264
 
265
- @defer.task! { @deferred.resolve(:foo) }
266
- @defer.task! { deferred2.resolve(:baz) }
267
- @defer.task! { deferred1.resolve(:bar) }
265
+ @defer.async.task { @deferred.resolve(:foo) }
266
+ @defer.async.task { deferred2.resolve(:baz) }
267
+ @defer.async.task { deferred1.resolve(:bar) }
268
268
 
269
269
  @resource.wait(@mutex)
270
270
  }
@@ -281,8 +281,8 @@ describe Celluloid::Q do
281
281
  @finish.call
282
282
  })
283
283
 
284
- @defer.task! { @deferred.resolve(:foo) }
285
- @defer.task! { deferred2.reject(:baz) }
284
+ @defer.async.task { @deferred.resolve(:foo) }
285
+ @defer.async.task { deferred2.reject(:baz) }
286
286
 
287
287
  @resource.wait(@mutex)
288
288
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: celluloid-promise
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen von Takach