concurrent_rails 0.1.6 → 0.1.7
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 +4 -4
- data/README.md +2 -2
- data/lib/concurrent_rails/promises.rb +9 -1
- data/lib/concurrent_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe2277deed1f15f3c47a332667db0b85bbfb0d39d58bcb6539fa0d15d843c55d
|
4
|
+
data.tar.gz: 0e347f69da65b60fcbdb63a04cdcb3bac782ba01b6e543db93428ff4c2bdbdc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '079c165494e1eea8ae9c98fe89031c87408808527a3f90eda3c5c5d87598bfb5932b0285acaa99d4e5e714a1012af3676bc16fc9b5929268ff26640b90f4b191'
|
7
|
+
data.tar.gz: 97944d3f3db134d08eb894f6f3211a705cb080ec4d4ec331657c94940fd08a08c4f1f46859d430f3c2e5097a1cc54d7de322e9f39a0fcc48de78d49982cd26e8
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ The goal of this gem is to provide a simple library that allows the developer to
|
|
9
9
|
|
10
10
|
## Usage
|
11
11
|
|
12
|
-
This library provides three classes that will help you run tasks in parallel: `ConcurrentRails::Promises`, `ConcurrentRails::Future` and `ConcurrentRails::Multi`
|
12
|
+
This library provides three classes that will help you run tasks in parallel: `ConcurrentRails::Promises`, `ConcurrentRails::Future` ([in process of being deprecated by concurrent-ruby](https://github.com/ruby-concurrency/concurrent-ruby#deprecated)) and `ConcurrentRails::Multi`
|
13
13
|
|
14
14
|
### Promises
|
15
15
|
|
@@ -143,7 +143,7 @@ For more information on how Futures work and how Rails handle multithread check
|
|
143
143
|
Add this line to your application's Gemfile:
|
144
144
|
|
145
145
|
```ruby
|
146
|
-
gem 'concurrent_rails', '~> 0.1.
|
146
|
+
gem 'concurrent_rails', '~> 0.1.7'
|
147
147
|
```
|
148
148
|
|
149
149
|
And then execute:
|
@@ -23,6 +23,14 @@ module ConcurrentRails
|
|
23
23
|
self
|
24
24
|
end
|
25
25
|
|
26
|
+
def chain(*args, &task)
|
27
|
+
Rails.application.executor.wrap do
|
28
|
+
future_instance.chain(*args, &task)
|
29
|
+
end
|
30
|
+
|
31
|
+
self
|
32
|
+
end
|
33
|
+
|
26
34
|
%i[value value!].each do |method_name|
|
27
35
|
define_method method_name do |timeout = nil, timeout_value = nil|
|
28
36
|
Rails.application.executor.wrap do
|
@@ -41,7 +49,7 @@ module ConcurrentRails
|
|
41
49
|
self
|
42
50
|
end
|
43
51
|
|
44
|
-
def_delegators :@future_instance, :state, :reason, :rejected?, :
|
52
|
+
def_delegators :@future_instance, :state, :reason, :rejected?, :resolved?
|
45
53
|
|
46
54
|
private
|
47
55
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: concurrent_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luiz Eduardo Kowalski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04
|
11
|
+
date: 2021-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|