pretty_multitask 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/lib/pretty_multitask.rb +1 -0
- data/lib/pretty_multitask/run_callable.rb +9 -4
- data/lib/pretty_multitask/runner.rb +1 -0
- data/lib/pretty_multitask/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: c87f12464064816aeeca47d2f9e5168a184299a9e71583a9b718ffdb2821a365
|
4
|
+
data.tar.gz: 4516ed4cfcb98738e840868a9688f44785398e67d48f979ba9195731c59347ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e5a3357f92557477761e6175e4ffe97c9470aa3c20247647879f3acb8981cb0b6dc885adf36610a6f012658a80d19c341acbc30e28a638133b2b4b803afd683
|
7
|
+
data.tar.gz: bc62a7f8b16e85cbfd984b047e4c4ae28f932ced4fbd74507b2bb73794e11e0eef07577038ab4943eca66f41f469caeed896f66d927f4ac73972ff1b0c1b7999
|
data/lib/pretty_multitask.rb
CHANGED
@@ -37,8 +37,6 @@ module PrettyMultitask
|
|
37
37
|
t_out = consume_and_print slave, out, name, false
|
38
38
|
t_err = consume_and_print err_read, out, name, true
|
39
39
|
|
40
|
-
Process.wait pid
|
41
|
-
|
42
40
|
%i[slave err_read].each do |e|
|
43
41
|
loop { break unless binding.local_variable_get(e).ready? }
|
44
42
|
end
|
@@ -54,8 +52,15 @@ module PrettyMultitask
|
|
54
52
|
%i[master slave err_read err_write].each { |e| binding.local_variable_get(e).close }
|
55
53
|
|
56
54
|
chars = []
|
57
|
-
|
58
|
-
|
55
|
+
t = Thread.new do
|
56
|
+
sleep 0.1 until r.ready?
|
57
|
+
(1..3).each do
|
58
|
+
chars << r.getc while r.ready?
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
Process.wait pid
|
63
|
+
Timeout.timeout(1) { t.join }
|
59
64
|
|
60
65
|
result = Marshal.load(chars.join)
|
61
66
|
raise result[:error] if result[:error]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pretty_multitask
|
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
|
- Tiago Lopo Da Silva
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tlopo-executor
|