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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fdf1716e96ece289c24b2259f51862f8e0b0f847
4
- data.tar.gz: 9def49fb3291dc30d43fd135e13ea4475f92c01b
3
+ metadata.gz: 063eac1956632198fa3adbc13cac6d8d66cc2c78
4
+ data.tar.gz: 844f12d89d2926f6843c22571cb65657e60cd8b0
5
5
  SHA512:
6
- metadata.gz: 203c99df1e7b83eff110d5dcfed5f607fbd7ff681f844b10de394b7c9fb9ed1d29c53a665500ef55d2e4c8272546e7ce7270d9a63fd7add7f01a92f351daced6
7
- data.tar.gz: bc35ea931662f4076c35f8e74df08739a149875e86d50cc3fe146fe458f07c640ba020a3e79eccb72680303980f72c36a0d102afcf45f02193432be819515c5a
6
+ metadata.gz: 6f9ede40f166a22cf807f277f4e17b4a3c3f7444b56fa98dcec12b13cedc1297461f2cbe6ba198cf5b1773e9bff09902fe474b19bd7a7c16e368a34a3a87e1fa
7
+ data.tar.gz: 1f07ed06eb8aeda718d2e6b9709314f6e4fd6ca11f4e08310f149748183f1c8e075cc50bbf6a510e6c1366aaf3a237a416d0f35e0c39a19d6e104cb8b567fdef
@@ -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 Thread.main == Thread.current
6
- EM.next_tick do
7
- Thread.new do
8
- sleep(0.1)
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
 
@@ -1,3 +1,3 @@
1
1
  module Bacon
2
- VERSION = "1.7.1"
2
+ VERSION = "1.7.2"
3
3
  end
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.1
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-14 00:00:00.000000000 Z
11
+ date: 2018-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: term-ansicolor