schmurfy-bacon 1.7.1 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bacon/ext/em_threads.rb +9 -6
- data/lib/bacon/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 063eac1956632198fa3adbc13cac6d8d66cc2c78
|
4
|
+
data.tar.gz: 844f12d89d2926f6843c22571cb65657e60cd8b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f9ede40f166a22cf807f277f4e17b4a3c3f7444b56fa98dcec12b13cedc1297461f2cbe6ba198cf5b1773e9bff09902fe474b19bd7a7c16e368a34a3a87e1fa
|
7
|
+
data.tar.gz: 1f07ed06eb8aeda718d2e6b9709314f6e4fd6ca11f4e08310f149748183f1c8e075cc50bbf6a510e6c1366aaf3a237a416d0f35e0c39a19d6e104cb8b567fdef
|
data/lib/bacon/ext/em_threads.rb
CHANGED
@@ -1,18 +1,21 @@
|
|
1
1
|
module Bacon
|
2
2
|
module Threaded
|
3
|
+
class << self
|
4
|
+
attr_accessor :context_thread
|
5
|
+
end
|
3
6
|
|
4
7
|
def run(*)
|
5
|
-
if
|
6
|
-
|
7
|
-
|
8
|
-
|
8
|
+
if Threaded.context_thread == Thread.current
|
9
|
+
super
|
10
|
+
else
|
11
|
+
EM.run do
|
12
|
+
EM.defer do
|
13
|
+
Threaded.context_thread = Thread.current
|
9
14
|
super
|
10
15
|
EM::stop_event_loop()
|
11
16
|
end
|
12
17
|
|
13
18
|
end
|
14
|
-
else
|
15
|
-
super
|
16
19
|
end
|
17
20
|
end
|
18
21
|
|
data/lib/bacon/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schmurfy-bacon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Neukirchen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: term-ansicolor
|