rbgo 0.1.1 → 0.1.2
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/Gemfile.lock +1 -1
- data/lib/rbgo/corun.rb +5 -2
- data/lib/rbgo/version.rb +1 -1
- data/rbgo.gemspec +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: 6b7d4112a298f4a00764f1b82c47c1f943f6b83688dd623351d09d7b87acf125
|
4
|
+
data.tar.gz: ac2778f7c8c479bb7e0ea545e870ca9757ea2836528bb80bd9743c6bc4992f7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a08a97d29e741ed4133272da25d865d8236f1c5f8f8455c53e80959d41d8c7108ac891ac4598b1b2c8d04d508e7712190b8e26661a5310491ce07335b925037
|
7
|
+
data.tar.gz: 86d7c76d6ace344c23c7d85b67c2597ef6ce1f967abd9faf4a07067f83a16b7d99edb9ccece5997ebdf0182e46f48a7da00eec07a6fceee65496799660248285
|
data/Gemfile.lock
CHANGED
data/lib/rbgo/corun.rb
CHANGED
@@ -37,8 +37,9 @@ module Rbgo
|
|
37
37
|
end
|
38
38
|
|
39
39
|
class Scheduler
|
40
|
+
|
40
41
|
include Singleton
|
41
|
-
attr_accessor :num_thread
|
42
|
+
attr_accessor :num_thread, :check_interval
|
42
43
|
|
43
44
|
private
|
44
45
|
|
@@ -54,6 +55,8 @@ module Rbgo
|
|
54
55
|
self.msg_queue = Queue.new
|
55
56
|
self.task_queue = Queue.new
|
56
57
|
|
58
|
+
self.check_interval = 0.1
|
59
|
+
|
57
60
|
msg_queue << :init
|
58
61
|
create_supervisor_thread
|
59
62
|
generate_check_msg
|
@@ -134,7 +137,7 @@ module Rbgo
|
|
134
137
|
begin
|
135
138
|
loop do
|
136
139
|
msg_queue << :check
|
137
|
-
sleep
|
140
|
+
sleep check_interval
|
138
141
|
end
|
139
142
|
ensure
|
140
143
|
STDERR.puts 'check generator thread exit'
|
data/lib/rbgo/version.rb
CHANGED
data/rbgo.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
|
18
18
|
In MRI write program to run concurrently even not parallelly is also important.
|
19
19
|
|
20
|
-
This project is trying to help writing concurrent program with ruby a little easier
|
20
|
+
This project is trying to help writing concurrent program with ruby a little easier.
|
21
21
|
END
|
22
22
|
s.add_dependency "sys-cpu", "~> 0.8"
|
23
23
|
s.files = `git ls-files`.split("\n")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbgo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wang Yin
|
@@ -30,7 +30,7 @@ description: " You can produce a light weight routine easily
|
|
30
30
|
ruby implementations such as TruffleRuby or JRuby which can utilize all CPU cores.\n\n
|
31
31
|
\ In MRI write program to run concurrently even not parallelly
|
32
32
|
is also important. \n\n This project is trying to help writing
|
33
|
-
concurrent program with ruby a little easier
|
33
|
+
concurrent program with ruby a little easier.\n"
|
34
34
|
email:
|
35
35
|
- 24588062@qq.com
|
36
36
|
executables: []
|