-
Notifications
You must be signed in to change notification settings - Fork 419
Edge development #274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Edge development #274
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
7d2b87d
Extracted actor & channel into an "edge" gem.
jdantonio 05b6e76
First draft IVar-Future-Promise-Probe unification
pitr-ch ae2b6a2
Adding Delay and benchmark of the synchronization
pitr-ch 3dfd5c3
Various improvements
pitr-ch fc802e5
Allows to build promise trees with lazy evaluated branches
pitr-ch aa4bf37
Adding more documentation
pitr-ch 42d62af
Add join method on instance, with alias :+
pitr-ch a14278a
Move #post method to different Shortcut module
pitr-ch 3d62bdf
Adding doc for shortcut methods.
pitr-ch a12e866
Add Scheduled a Promise implementation replacing ScheduledTask.
pitr-ch 0947cb6
Fix rescue behavior to be like Scala's Future#recover
pitr-ch 6cffd19
First attempt to break classes down
pitr-ch 7430ca0
Better break down of Promises to classes
pitr-ch 29d2958
Readme updates
pitr-ch 22e00b7
Simplify moving features between gems
pitr-ch 916f613
Merge branch 'master' into edge-experimental-incubator
pitr-ch 4a02498
Fix require paths
pitr-ch dc2bf4c
Merge branch 'edge-experimental-incubator' into devel
pitr-ch af23a18
Merge branch 'next' into devel
pitr-ch 80b2e46
Add Concurrent.executor as an easy access point to global executors
pitr-ch 84b1417
Synchronization and behavior separation
pitr-ch f92204a
Move the new Futures to Edge namespace
pitr-ch 162b7c1
Use ns_wait_until
pitr-ch 433559d
Separate synchronization and behavior in rest of the classes
pitr-ch b830e8f
Remove synchronization leaks
pitr-ch 53425e8
Unify rspec configuration
pitr-ch 11a3d3b
Updates to new synchronization module
pitr-ch 29d0380
Merge branch 'master' into devel
pitr-ch 8fd8bf2
Stabilize tests
pitr-ch 701a6b6
Improvements
pitr-ch 113fe07
Actor migrated to Edge::Future and integration added
pitr-ch 0ac67e6
Merge branch 'master' into devel
pitr-ch 4272db4
Improve tests
pitr-ch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,3 @@ ext/**/*.bundle | |
ext/**/*.so | ||
ext/**/*.jar | ||
pkg | ||
*.gem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
--require spec_helper | ||
--format progress | ||
--color | ||
--backtrace | ||
--format documentation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
$:.push File.join(File.dirname(__FILE__), 'lib') | ||
|
||
require 'concurrent/version' | ||
require 'concurrent/file_map' | ||
|
||
Gem::Specification.new do |s| | ||
git_files = `git ls-files`.split("\n") | ||
|
||
s.name = 'concurrent-ruby-edge' | ||
s.version = Concurrent::EDGE_VERSION | ||
s.platform = Gem::Platform::RUBY | ||
s.authors = ["Jerry D'Antonio", 'The Ruby Concurrency Team'] | ||
s.email = ['[email protected]', '[email protected]'] | ||
s.homepage = 'http://www.concurrent-ruby.com' | ||
s.summary = 'Edge features and additions to the concurrent-ruby gem.' | ||
s.license = 'MIT' | ||
s.date = Time.now.strftime('%Y-%m-%d') | ||
s.files = Concurrent::FILE_MAP.fetch :edge | ||
s.extra_rdoc_files = Dir['README*', 'LICENSE*'] | ||
s.require_paths = ['lib'] | ||
s.description = <<-TXT | ||
These features are under active development and may change frequently. They are expected not to | ||
keep backward compatibility (there may also lack tests and documentation). Semantic versions will | ||
be obeyed though. Features developed in `concurrent-ruby-edge` are expected to move to `concurrent-ruby` when final. | ||
Please see http://concurrent-ruby.com for more information. | ||
TXT | ||
|
||
s.required_ruby_version = '>= 1.9.3' | ||
|
||
s.add_runtime_dependency 'concurrent-ruby', "~> #{Concurrent::VERSION}" | ||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,30 @@ | ||
$:.push File.join(File.dirname(__FILE__), 'lib') | ||
|
||
require 'concurrent/version' | ||
require 'concurrent/file_map' | ||
|
||
Gem::Specification.new do |s| | ||
s.name = 'concurrent-ruby' | ||
s.version = Concurrent::VERSION | ||
s.platform = Gem::Platform::RUBY | ||
s.author = "Jerry D'Antonio" | ||
s.email = '[email protected]' | ||
s.homepage = 'http://www.concurrent-ruby.com' | ||
s.summary = 'Modern concurrency tools for Ruby. Inspired by Erlang, Clojure, Scala, Haskell, F#, C#, Java, and classic concurrency patterns.' | ||
s.license = 'MIT' | ||
s.date = Time.now.strftime('%Y-%m-%d') | ||
git_files = `git ls-files`.split("\n") | ||
|
||
s.description = <<-EOF | ||
Modern concurrency tools including agents, futures, promises, thread pools, actors, supervisors, and more. | ||
Inspired by Erlang, Clojure, Go, JavaScript, actors, and classic concurrency patterns. | ||
EOF | ||
|
||
s.files = Dir['lib/**/*.rb'] | ||
s.name = 'concurrent-ruby' | ||
s.version = Concurrent::VERSION | ||
s.platform = Gem::Platform::RUBY | ||
s.authors = ["Jerry D'Antonio", 'The Ruby Concurrency Team'] | ||
s.email = ['[email protected]', '[email protected]'] | ||
s.homepage = 'http://www.concurrent-ruby.com' | ||
s.summary = 'Modern concurrency tools for Ruby. Inspired by Erlang, Clojure, Scala, Haskell, F#, C#, Java, and classic concurrency patterns.' | ||
s.license = 'MIT' | ||
s.date = Time.now.strftime('%Y-%m-%d') | ||
s.files = Concurrent::FILE_MAP.fetch :core | ||
s.extra_rdoc_files = Dir['README*', 'LICENSE*', 'CHANGELOG*'] | ||
s.require_paths = ['lib'] | ||
s.description = <<-EOF | ||
Modern concurrency tools including agents, futures, promises, thread pools, actors, supervisors, and more. | ||
Inspired by Erlang, Clojure, Go, JavaScript, actors, and classic concurrency patterns. | ||
EOF | ||
|
||
if defined?(JRUBY_VERSION) | ||
s.files += Dir['lib/**/*.jar'] | ||
s.files += Dir['lib/**/*.jar'] | ||
s.platform = 'java' | ||
else | ||
s.add_runtime_dependency 'ref', '~> 1.0', '>= 1.0.5' | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Futures and Promises | ||
|
||
New implementation added in version 0.8 differs from previous versions and has little in common. | ||
{Future} represents a value which will become {#completed?} in future, it'll contain {#value} if {#success?} or a {#reason} if {#failed?}. It cannot be directly completed, there are implementations of abstract {Promise} class for that, so {Promise}'s only purpose is to complete a given {Future} object. They are always constructed as a Pair even in chaining methods like {#then}, {#rescue}, {#then_delay}, etc. | ||
|
||
There is few {Promise} implementations: | ||
|
||
- OuterPromise - only Promise used by users, can be completed by outer code. Constructed with {Concurrent::Next.promise} helper method. | ||
- Immediate - internal implementation of Promise used to represent immediate evaluation of a block. Constructed with {Concurrent::Next.future} helper method. | ||
- Delay - internal implementation of Promise used to represent delayed evaluation of a block. Constructed with {Concurrent::Next.delay} helper method. | ||
- ConnectedPromise - used internally to support {Future#with_default_executor} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
require 'concurrent' | ||
|
||
require 'concurrent/actor' | ||
require 'concurrent/channel' | ||
require 'concurrent/edge/future' | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I was created the extension gem I ran into some problem with this. I can't remember what it was. That's why the extension gem isn't listed here. We'll need to take a look at this after we merge. Whatever it was may no longer be an issue.