ifuture 0.3.2 → 0.3.3

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: 8c3bc9a8cedc6bd4c14296325ea22e34309be930
4
- data.tar.gz: 889523d8a40742533675cdd63497c148ff6b2cde
3
+ metadata.gz: b9afa7a2cf5f57a8c98726b851502ee0a45f7429
4
+ data.tar.gz: 13ee13247be8c2bc3f3cc90131944ace3a5da864
5
5
  SHA512:
6
- metadata.gz: d8e863fb5f6225ec455500f0c82f58a668e74ca0eb1b9d15d45242ca514ea1b046e4d2c77a821a3f39281b766624da88c08353b829c527259bc7da158e4d5369
7
- data.tar.gz: b53a66cbce033818f2e7986c285e6e3fbac5a86854a966d4357a8c5ae261aefd17b2ead9fac85f83d0c2dfa52a5e3f702b49917d739fa38d5fc228f70dd0bc55
6
+ metadata.gz: 98e014e4c0fbbd3571dd4a2fb93324c9609c2d08d8fe7bd6eca3a7e051dbe7988a97323aecc57916880ed1c59b3adbe4ff0fa8dd8a391f664c111964ad3133db
7
+ data.tar.gz: 6e37cd3c14f045e27503a99b140c9806b8730a33a84a3ea2edef37f6b6bdc8aa8c63a99357c4769bb1f325ab7873d567f5189f4eeee37f9e48e2089f113c4a0c
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
- # iFuture
1
+ # ifuture
2
2
  [![Build Status](https://secure.travis-ci.org/havenwood/ifuture.png?branch=master)](http://travis-ci.org/havenwood/ifuture)
3
- [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/Havenwood/ifuture)
3
+ [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/havenwood/ifuture)
4
4
 
5
- A Futures gem for Ruby implemented with [IChannel](https://github.com/robgleeson/ichannel) for interprocess communication over a unix socket or Redis. Run some code in another process and get the result back later!
5
+ ifuture is a Futures gem for Ruby that use processes forking rather than threads. This allows parallelism with MRI without the GIL blocking as it might with threads. ifuture is implemented with [ichannel](https://github.com/robgleeson/ichannel) for interprocess communication over a Unix socket or Redis. Run your code in another process and get the result back later!
6
6
 
7
- The Future starts running right away, but isn't blocking because it runs in its own fork and uses IChannel to communicate with the parent Process. This allows multithreading without the GIL blocking as it would with Futures implemented on Threads. If the value is asked for and it is ready, it will be returned right away. If the value is asked for early, the Future blocks until delivery.
7
+ The Future starts running right away, but isn't blocking because it runs in its own forked process and uses ichannel to communicate with the parent process. If the value is asked for and it is ready, it will be returned right away. If the value is asked for early, the Future blocks until delivery.
8
8
 
9
9
  ## Installation
10
10
 
@@ -20,13 +20,13 @@ The Redis gem is required as well if you opt to use Redis instead of the default
20
20
  require 'ifuture'
21
21
  future = IFuture.unix Marshal do
22
22
  sleep 2
23
- 'Put that in your unix socket and smoke it'
23
+ 'result back from the child process!'
24
24
  end
25
25
 
26
- future.ready? # => false
26
+ future.ready? #=> false
27
27
  sleep 2
28
- future.ready? # => true
29
- future.value # => "Put that in your unix socket and smoke it"
28
+ future.ready? #=> true
29
+ future.value #=> "result back from the child process!"
30
30
  ```
31
31
 
32
32
  ### Code Serialization Format
@@ -40,11 +40,12 @@ future = IFuture.unix JSON do
40
40
  sleep 2
41
41
  {ok: true}
42
42
  end
43
+ future.value #=> {"ok"=>true}
43
44
  ```
44
45
 
45
46
  ### IPC Transporter
46
47
 
47
- By default iFuture uses IChannel with unix sockets for transferring serialized code. An alternate choice is to use IChannel with Redis, locally or over the network.
48
+ By default ifuture uses ichannel with unix sockets for transferring serialized code. An alternate choice is to use ichannel with Redis, locally or over the network.
48
49
 
49
50
  ```ruby
50
51
  require 'ifuture'
@@ -52,7 +53,7 @@ future = IFuture.redis Marshal, {host: 'localhost', key: 'readme'} do
52
53
  sleep 5
53
54
  42
54
55
  end
55
- future.value # => 42
56
+ future.value #=> 42
56
57
  ```
57
58
 
58
59
  ## Contributing
@@ -60,3 +61,4 @@ future.value # => 42
60
61
  1. Fork it
61
62
  2. Commit your changes
62
63
  3. Create a pull request
64
+ 4. :cake:
data/ifuture.gemspec CHANGED
@@ -15,9 +15,9 @@ Gem::Specification.new do |gem|
15
15
  gem.files = `git ls-files`.split($/)
16
16
  gem.require_paths = ['lib']
17
17
 
18
- gem.add_development_dependency 'ichannel', '~> 8.0.0'
18
+ gem.add_development_dependency 'ichannel', '~> 8.1.0'
19
19
  gem.add_development_dependency 'minitest'
20
20
  gem.add_development_dependency 'rake'
21
21
 
22
- gem.add_runtime_dependency 'ichannel', '~> 8.0.0'
22
+ gem.add_runtime_dependency 'ichannel', '~> 8.1.0'
23
23
  end
@@ -1,3 +1,3 @@
1
1
  class IFuture
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  end
metadata CHANGED
@@ -1,71 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ifuture
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shannon Skipper
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-16 00:00:00.000000000 Z
11
+ date: 2013-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ichannel
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 8.0.0
19
+ version: 8.1.0
20
20
  type: :development
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: 8.0.0
26
+ version: 8.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: ichannel
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 8.0.0
61
+ version: 8.1.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 8.0.0
68
+ version: 8.1.0
69
69
  description: Futures over interprocess communication.
70
70
  email:
71
71
  - shannonskipper@gmail.com
@@ -73,8 +73,8 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
- - .gitignore
77
- - .travis.yml
76
+ - ".gitignore"
77
+ - ".travis.yml"
78
78
  - Gemfile
79
79
  - LICENSE.txt
80
80
  - README.md
@@ -94,17 +94,17 @@ require_paths:
94
94
  - lib
95
95
  required_ruby_version: !ruby/object:Gem::Requirement
96
96
  requirements:
97
- - - '>='
97
+ - - ">="
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - '>='
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  requirements: []
106
106
  rubyforge_project:
107
- rubygems_version: 2.0.7
107
+ rubygems_version: 2.1.10
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: A Futures gem for Ruby implemented with IChannel for interprocess communication