tpx 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tpx.rb +6 -5
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55de57e45c1184b31a3d2f499406fcc583ef2920a8ca5df787aa21275fa691a7
4
- data.tar.gz: 47c9f9879523ca81720bd35c27a01d15c7bbb61e424f29a33a37c11c1250ec4e
3
+ metadata.gz: 1a571c89cdd3261e6803c373a8214d7ae710054a7441f033b603b420f8f51497
4
+ data.tar.gz: d72a49a7272da9959358325527d12e1586d089ca52d1997a0b9d395695c7625d
5
5
  SHA512:
6
- metadata.gz: b3c94e7fe2fe779fc4b66ff3332fcf6a85af04a850c300c895480fc546d0b1a66550c8b901278e03801f1caeff31092d0b4cdb6473143d48e2a211034ba0ec06
7
- data.tar.gz: b67411339bb2e5c4da9d53651e993411f1a4702a62d03a0549981710b08487a353283c031a0baabbb6987ec61fe483ff6c459024980eb5a3fbac11b62a8aae77
6
+ metadata.gz: 075ecf8d191001320b17f6fa0462921cb63520133e4b26fab737c3925cd46601ea80eb9ee78064ea54776959dc8cd05efb4c5cba576fbdb795003dd267d544a5
7
+ data.tar.gz: c128ae518adfb0643033b42ad394eb1c152bb7474c7c9748e2fdd0806ae6dbca8da42efc2df93aaaab3934a1a3a828bbca49a0b6ae609940e23dcf97c819419a
data/lib/tpx.rb CHANGED
@@ -7,7 +7,8 @@ module TPX
7
7
  end
8
8
 
9
9
  def add(args, &block)
10
- @exec.schedule_m_add([@q, @cnt, args], &block)
10
+ jid = args.shift
11
+ @exec.schedule_m_add([@q, jid, args], &block)
11
12
  @cnt += 1
12
13
  end
13
14
 
@@ -30,8 +31,8 @@ module TPX
30
31
  catch(:exit) do
31
32
  loop do
32
33
  begin
33
- jix, job, args, acc = @jobs.pop
34
- acc << [jix, job.call(*args)]
34
+ jid, job, args, acc = @jobs.pop
35
+ acc << [jid, job.call(*args)]
35
36
  rescue => e
36
37
  acc << 'ERROR'
37
38
  end
@@ -53,9 +54,9 @@ module TPX
53
54
 
54
55
  def schedule_m_add(args, &block)
55
56
  acc = args[0]
56
- jix = args[1]
57
+ jid = args[1]
57
58
  args = args[2]
58
- @jobs << [jix, block, args, acc]
59
+ @jobs << [jid, block, args, acc]
59
60
  end
60
61
 
61
62
  def schedule_m_read(acc, n)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tpx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - bfx devs