future_proof 0.0.4 → 0.1.0

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
  SHA1:
3
- metadata.gz: f4a0d0a882b8da1f1bf03f83a78fdd5c358312cb
4
- data.tar.gz: 7cc74e59ce7c4433bda42268b342702dbba72fd8
3
+ metadata.gz: 96e0314d6035485600efa021de9f27eed0e266c0
4
+ data.tar.gz: 22a88afa1bee958adab6ea80cc5222fb3961fbfb
5
5
  SHA512:
6
- metadata.gz: a325925c0458a6a4ce764e449b66890ac998ba0c6eff8ca18837596d6fb1f91da74c04841566cd53489297a0cc6069a8e9d6e04d9f17a0057614a594fec563c9
7
- data.tar.gz: 2ec4705cff77ce7254edb1fc7c6aeb123915199e549c9e50875821f60b931028a5882a4526bf1294d571d377470680b196d9571717f3c6e3748aebcc26df0150
6
+ metadata.gz: 8368ae8968c48af887c7a70c9e9dbcfcff4eaef7c3e6dcb0c6a0d0fbaf00ae17dd8fcba2b710e65bb14c3df46c4679b3b0460549ed3b04142361faaad1f520ba
7
+ data.tar.gz: de7386bf63e0d3321ecbe7de21d3604343037b17b7c32e164ffbdaa6026680ad97c0a815da4e233f6dfea11cac74a96142e01000095c3322881197e5d3d7f5c3
data/README.md CHANGED
@@ -44,9 +44,9 @@ Or install it yourself as:
44
44
 
45
45
  ## Exceptions
46
46
 
47
- If exception happens inside a thread it doesn't affect the whole process.
48
- Exception is raised when accessing specific value:
49
- thread_pool.values[3] # => raises exception
47
+ If exception happens inside a thread it doesn't affect the whole process. Exception is raised when accessing specific value:
48
+
49
+ thread_pool.values[3] # => raises exception
50
50
 
51
51
  ## Contributing
52
52
 
@@ -1,11 +1,11 @@
1
1
  module FutureProof
2
2
 
3
- # Module +Exceptionable+ provides methods to read values with exceptions
3
+ # Module +Exceptionable+ provides methods to read values with exceptions.
4
4
  module Exceptionable
5
5
 
6
6
  private
7
7
 
8
- # Returns value or raises exception if its an exception instance
8
+ # Returns value or raises exception if its an exception instance.
9
9
  def raise_or_value(value)
10
10
  value.is_a?(StandardError) ? raise(value) : value
11
11
  end
@@ -34,12 +34,12 @@ module FutureProof
34
34
  thread(*args).value
35
35
  end
36
36
 
37
- # Return true if Future is done working.
37
+ # Return true if +Future+ is done working.
38
38
  #
39
39
  # @exmaple Get state of +Future+
40
40
  # future.complete?
41
41
  #
42
- # @return [true, galse] true if +Future+ is done working.
42
+ # @return [true, false] true if +Future+ is done working.
43
43
  def complete?
44
44
  !thread.alive?
45
45
  end
@@ -51,7 +51,7 @@ module FutureProof
51
51
  @size.times { @queue.push :END_OF_WORK }
52
52
  end
53
53
 
54
- # Calls #finalize and block programm flow until all jobs are processed.
54
+ # Calls #finalize and blocks programm flow until all jobs are processed.
55
55
  def wait
56
56
  finalize
57
57
  @threads.map &:join
@@ -1,3 +1,3 @@
1
1
  module FutureProof
2
- VERSION = '0.0.4'
2
+ VERSION = '0.1.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: future_proof
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikita Cernovs