concurrent_rails 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/concurrent_rails/future.rb +9 -7
- data/lib/concurrent_rails/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87ad625b78cf38b613761735ca3ca8ad7dbf12f16f807290082bf1a7081ad383
|
4
|
+
data.tar.gz: 723e320ec707747381e1d8b7f6b81f801c02643d2d18f4e714330041eeff49a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fa50d7cfad90990b29f75bdcf3f6e15dc8252774259b4d65af62f37cd36a4ed46b0ff5b091a39a8f0e0f54625e90d5444489dd6d4ea13b44d9c474d783c56d2
|
7
|
+
data.tar.gz: 3a75c1ccd1f4821827359c672c991b0ef071a2dc41a274447c1117c51bc52bc9cc41fec35cde38ef6d79b31d4047b419240ae99775c415bff66240433b05f340
|
data/README.md
CHANGED
@@ -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.5'
|
147
147
|
```
|
148
148
|
|
149
149
|
And then execute:
|
@@ -15,15 +15,17 @@ module ConcurrentRails
|
|
15
15
|
self
|
16
16
|
end
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
%i[value value!].each do |method_name|
|
19
|
+
define_method method_name do
|
20
|
+
Rails.application.executor.wrap do
|
21
|
+
result = nil
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
23
|
+
ActiveSupport::Dependencies.interlock.permit_concurrent_loads do
|
24
|
+
result = future.__send__(method_name)
|
25
|
+
end
|
25
26
|
|
26
|
-
|
27
|
+
result
|
28
|
+
end
|
27
29
|
end
|
28
30
|
end
|
29
31
|
|
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.5
|
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-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -75,7 +75,7 @@ licenses:
|
|
75
75
|
metadata:
|
76
76
|
homepage_uri: https://github.com/luizkowalski/concurrent_rails
|
77
77
|
source_code_uri: https://github.com/luizkowalski/concurrent_rails
|
78
|
-
changelog_uri: https://github.com/luizkowalski/concurrent_rails/CHANGELOG.md
|
78
|
+
changelog_uri: https://github.com/luizkowalski/concurrent_rails/blob/master/CHANGELOG.md
|
79
79
|
post_install_message:
|
80
80
|
rdoc_options: []
|
81
81
|
require_paths:
|