tribe 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d2145c5577d357092be0414dc111783969e351f
4
- data.tar.gz: d19e8a8dcfd6587dda45ee4e36b69c8acc860e3f
3
+ metadata.gz: 814f7dd73d35dd8a277792bf7f9026f487a609a8
4
+ data.tar.gz: d690805bd5a032a58594186b1d2b3c95788d3ddf
5
5
  SHA512:
6
- metadata.gz: 510323dc16919ba9a9e378215216279efd8ef21e27e47482c1140ab09ece81fb905b164fe85034d3b570c50c8cd82b332ea9f70beca4216656ad14eacf27d29f
7
- data.tar.gz: b96e88eaf1acd19a792f88a454a62fbb80d844dba9a37dab96b5852270bc00285a22c3a7e4ae320e47f47ab204c458ad032ddfb4d8690793cb918a6dabc0423f
6
+ metadata.gz: 29d3e039c97a559d301a6f2b08bc691c39d3cd5cd92eab75b3b017fe43e3ee894cfe2f55176bfeaaea44574c2509cef137fff45ec293825198b930a2ce857b31
7
+ data.tar.gz: b6bdb1d4b47d4797d57c1a09d26fff7cbcadeafb84f4478252da2ecfe4914ee4a052f59d8381b245f6a098a61a3c90678a7a8004b30f17cbeb34505704153a71
@@ -1 +1 @@
1
- 2.2.2
1
+ 2.4.1
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Tribe [![Build Status](https://travis-ci.org/chadrem/tribe.svg)](https://travis-ci.org/chadrem/tribe) [![Coverage Status](https://coveralls.io/repos/chadrem/tribe/badge.svg?branch=master&service=github)](https://coveralls.io/github/chadrem/tribe?branch=master)
2
2
 
3
- Tribe is a Ruby gem that implements the [actor model] (http://en.wikipedia.org/wiki/Actor_model "actors") in an event-driven way.
3
+ Tribe is a Ruby gem that implements the [actor model](http://en.wikipedia.org/wiki/Actor_model) in an event-driven way.
4
4
 
5
5
  Tribe focuses on high performance, low latency, a simple API, and flexibility.
6
6
  It's goal is to support at least one million actors running on a small group of threads.
7
- It is built on top of the [Workers] (https://github.com/chadrem/workers "Workers") gem.
7
+ It is built on top of the [Workers](https://github.com/chadrem/workers) gem.
8
8
 
9
9
  ## Contents
10
10
 
@@ -498,7 +498,7 @@ You should change this to a file in your application.
498
498
  ## Debugging
499
499
 
500
500
  Tribe is written in pure Ruby so it will work with all existing debuggers that support Ruby & threads.
501
- [Byebug] (https://github.com/deivid-rodriguez/byebug) is commonly used with MRI Ruby 2.X and will let you set breakpoints.
501
+ [Byebug](https://github.com/deivid-rodriguez/byebug) is commonly used with MRI Ruby 2.X and will let you set breakpoints.
502
502
 
503
503
  The most common problem you will encounter with actors is that they die due to exceptions.
504
504
  You can access the exception by calling the ````exception```` method on the actor:
@@ -511,7 +511,7 @@ You can access the exception by calling the ````exception```` method on the acto
511
511
 
512
512
  ## Benchmarks
513
513
 
514
- Please see the [performance] (https://github.com/chadrem/tribe/wiki/Performance "performance") wiki page for more information.
514
+ Please see the [performance](https://github.com/chadrem/tribe/wiki/Performance) wiki page for more information.
515
515
 
516
516
  ## Contributing
517
517
 
@@ -73,7 +73,7 @@ module Tribe
73
73
  if spawn_options[:no_raise_on_failure]
74
74
  begin
75
75
  child = klass.new(actor_options)
76
- rescue Exception => e
76
+ rescue Exception
77
77
  return false
78
78
  end
79
79
  else
@@ -8,6 +8,8 @@ module Tribe
8
8
  @success_callback = nil
9
9
  @failure_callback = nil
10
10
  @actor = actor
11
+ @timer = nil
12
+ @timeout = nil
11
13
 
12
14
  return nil
13
15
  end
@@ -72,7 +74,13 @@ module Tribe
72
74
  @lock.synchronize do
73
75
  return if @state == :finished
74
76
 
75
- @condition.wait(@lock)
77
+ # The wait can return even if nothing called @conditional.signal,
78
+ # so we need to check to see if the condition actually changed.
79
+ # See https://github.com/chadrem/workers/issues/7
80
+ loop do
81
+ @condition.wait(@lock)
82
+ break if @state == :finished
83
+ end
76
84
 
77
85
  return nil
78
86
  end
@@ -5,6 +5,7 @@ module Tribe
5
5
  @messages = []
6
6
  @alive = true
7
7
  @lock = Mutex.new
8
+ @owner_thread = nil
8
9
  end
9
10
 
10
11
  def push(event, &block)
@@ -16,7 +16,7 @@ module Tribe
16
16
  # Let the children die silently since the root actor should live forever.
17
17
  begin
18
18
  super
19
- rescue Tribe::ActorChildDied => e
19
+ rescue Tribe::ActorChildDied
20
20
  end
21
21
  end
22
22
  end
@@ -1,3 +1,3 @@
1
1
  module Tribe
2
- VERSION = '0.6.3'
2
+ VERSION = '0.6.4'
3
3
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "workers", "~> 0.6"
21
+ spec.add_dependency "workers", "~> 0.6.1"
22
22
 
23
23
  spec.add_development_dependency "bundler", "~> 1.10"
24
24
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tribe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chad Remesch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-11 00:00:00.000000000 Z
11
+ date: 2017-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: workers
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.6'
19
+ version: 0.6.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.6'
26
+ version: 0.6.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  version: '0'
120
120
  requirements: []
121
121
  rubyforge_project:
122
- rubygems_version: 2.4.5
122
+ rubygems_version: 2.6.11
123
123
  signing_key:
124
124
  specification_version: 4
125
125
  summary: Actors based concurrency library for Ruby.