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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d42224b87dc91afe774ebbcfeda537e5addd2fd898da529ca816c93718b91963
4
- data.tar.gz: ade50f32793166549a6b807e0d45c22cfc900e9d2de95263cb5dc32b31c13efd
3
+ metadata.gz: 6b7d4112a298f4a00764f1b82c47c1f943f6b83688dd623351d09d7b87acf125
4
+ data.tar.gz: ac2778f7c8c479bb7e0ea545e870ca9757ea2836528bb80bd9743c6bc4992f7a
5
5
  SHA512:
6
- metadata.gz: 879d5dceedf6ebd06b9739321116f6ebaec3991c6a5868c3b2d0e716b128a021e34c1ed8bc7423bf4991520a9ed44716c9a810bf89aabd124e17b3fa14519a5d
7
- data.tar.gz: d14fc3569d20237a36c46450308cd814825698faa8235b895714ae3a890bafe22f00910bd2c4278e5b1b2d797235e3efbd7b8f9525092c0356da3d8024623bf9
6
+ metadata.gz: 8a08a97d29e741ed4133272da25d865d8236f1c5f8f8455c53e80959d41d8c7108ac891ac4598b1b2c8d04d508e7712190b8e26661a5310491ce07335b925037
7
+ data.tar.gz: 86d7c76d6ace344c23c7d85b67c2597ef6ce1f967abd9faf4a07067f83a16b7d99edb9ccece5997ebdf0182e46f48a7da00eec07a6fceee65496799660248285
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rbgo (0.1.0)
4
+ rbgo (0.1.1)
5
5
  sys-cpu (~> 0.8)
6
6
 
7
7
  GEM
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 3
140
+ sleep check_interval
138
141
  end
139
142
  ensure
140
143
  STDERR.puts 'check generator thread exit'
data/lib/rbgo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rbgo
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.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\n"
33
+ concurrent program with ruby a little easier.\n"
34
34
  email:
35
35
  - 24588062@qq.com
36
36
  executables: []