miner_mover 0.1.2.1 → 0.1.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +20 -19
  3. data/VERSION +1 -1
  4. data/miner_mover.gemspec +9 -4
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d6d1e4d4ee9ab3ff3dedcd283b94f1c089dd6478657f215d0903a18bcbaa576f
4
- data.tar.gz: b0d0a6fc768ede45676fa68545379e915d98e9c9f8d6416c48b7bd564b8b09fc
3
+ metadata.gz: 4901bb324083ef4c73adb1ed174794d0c90821fe9eae11f7a9935690dab821e3
4
+ data.tar.gz: ad001e368e39ab5e11bc2750d37e6aee4ba6dc42be2e08d0f346f57065c12a88
5
5
  SHA512:
6
- metadata.gz: a3f7e4cffe3a1bc9805097a11f6490a7de4d64daa5c893e3341b569e89296d8dde97185a89f6cd5eabbcb4d9f1156d41c913fa33365601a6bb9cdacb4d8fbf6f
7
- data.tar.gz: ae1292dfb2249203ad53a0860900dc49b6b46cd618f586fae8fa549700195448824d29347fb19460ff191164420113c687711a8dbbf1b101b71f9154395824b9
6
+ metadata.gz: 22db270f2c03cbbcace66a2724ed8c98315b14caa3d0d135e02e04d98b9baaaa49c9b2bc3aaa7f64b35fd6d5416611e29d344582dbc3cc5820ce351ea0a6b22c
7
+ data.tar.gz: 7ef93f90a90e33c34e3a5412495a828fb9030ccb160389b764448bf5e7e9dfe022687b1db9ba6e64e7418af541a681033d437b21ff50ebba320b18fa4a9c6095
data/README.md CHANGED
@@ -42,33 +42,36 @@ configured via `:work_type`
42
42
 
43
43
  # Usage
44
44
 
45
- ## Install
46
-
47
- You'll want to use **Ruby 3.x** (CRuby) to make the most of Fibers.
48
-
49
- ### Dependencies
45
+ You'll want to use **Ruby 3.1+** (CRuby) to make the most of Ractors, Fibers,
46
+ and Fiber::Scheduler.
50
47
 
51
- * dotcfg
48
+ This gem can be used on JRuby and TruffleRuby, but several concurrency options
49
+ are not available: process forking, Ractors, and Fiber::Scheduler.
50
+ However, their threading performance exceeds CRuby's as they don't have a
51
+ Global VM Lock (GVL).
52
52
 
53
- `gem install dotcfg`
53
+ ## Install
54
54
 
55
- #### Additionally
55
+ Right now, a gem installation only provides the Miner Mover library.
56
+ Use the **Development** process below to access all of the demonstration
57
+ scripts showing the different concurrency strategies.
56
58
 
57
- To use Fiber::Scheduler and kqueue / epoll / io_uring:
59
+ `gem install miner_mover`
58
60
 
59
- * fiber_scheduler
60
- * io-event
61
+ For Ruby 3.1+ on linux, you'll also want:
61
62
 
62
63
  `gem install fiber_scheduler io-event`
63
64
 
64
- ### Clone
65
+ ## Development
65
66
 
66
67
  ```
67
68
  git clone https://github.com/rickhull/miner_mover
68
69
  cd miner_mover
70
+ bundle config set --local with development
71
+ bundle install
69
72
  ```
70
73
 
71
- ### Try rake
74
+ ### Rake Tasks
72
75
 
73
76
  Try: `rake -T` to see available [Rake tasks](Rakefile)
74
77
 
@@ -90,8 +93,6 @@ rake thread # Run demo/thread.rb
90
93
 
91
94
  Try: `rake test`
92
95
 
93
- ## Rake Tasks
94
-
95
96
  Included demonstration scripts can be executed via Rake tasks.
96
97
  The following order is recommended:
97
98
 
@@ -106,7 +107,7 @@ The following order is recommended:
106
107
  Try each task; there will be about 6 seconds worth of many lines of output
107
108
  logging. These rake tasks correspond to the scripts within [`demo/`](demo/).
108
109
 
109
- ## Satisfy `LOAD_PATH`
110
+ ### Satisfy `LOAD_PATH`
110
111
 
111
112
  Rake tasks take care of `LOAD_PATH`, so the following is
112
113
  **only necessary when *not* using rake tasks**:
@@ -116,7 +117,7 @@ Rake tasks take care of `LOAD_PATH`, so the following is
116
117
  `require 'miner_mover'` will work.
117
118
  * This project does not use `require_relative`
118
119
 
119
- ## Exploration in `irb`
120
+ ### Exploration in `irb`
120
121
 
121
122
  `$ irb -I lib`
122
123
 
@@ -190,7 +191,7 @@ irb(main):010:0> mover.state
190
191
  :ore_moved=>0}
191
192
  ```
192
193
 
193
- ## Included scripts
194
+ ### Included scripts
194
195
 
195
196
  These scripts implement a full miner mover simulation using different
196
197
  multitasking paradigms in Ruby.
@@ -210,7 +211,7 @@ multiple miners or movers.
210
211
 
211
212
  Execute via e.g. `ruby -Ilib demo/thread.rb`
212
213
 
213
- ### Approaches
214
+ ### Concurrency Strategies
214
215
 
215
216
  #### [Serial](demo/serial.rb)
216
217
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2.1
1
+ 0.1.2.3
data/miner_mover.gemspec CHANGED
@@ -13,10 +13,15 @@ EOF
13
13
 
14
14
  s.version = File.read(File.join(__dir__, 'VERSION')).chomp
15
15
 
16
- s.files = %w[miner_mover.gemspec VERSION README.md Rakefile]
17
- s.files += Dir['lib/**/*.rb']
18
- s.files += Dir['test/**/*.rb']
19
- s.files += Dir['demo/**/*.rb']
16
+ s.files = Dir[
17
+ 'miner_mover.gemspec',
18
+ 'VERSION',
19
+ 'README.md',
20
+ 'Rakefile',
21
+ 'lib/**/*.rb',
22
+ 'test/**/*.rb',
23
+ 'demo/**/*.rb',
24
+ ]
20
25
 
21
26
  s.add_runtime_dependency "dotcfg", "~> 1.0"
22
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miner_mover
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2.1
4
+ version: 0.1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rick Hull
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  requirements: []
75
- rubygems_version: 3.4.4
75
+ rubygems_version: 3.4.1
76
76
  signing_key:
77
77
  specification_version: 4
78
78
  summary: This project provides a basic concurrency problem useful for exploring different