Skip to content

Support send and send-off methods for Agent #71

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 3 commits into from
May 12, 2014

Conversation

pitr-ch
Copy link
Member

@pitr-ch pitr-ch commented May 12, 2014

like clojure has. Currently Agent supports setting an executor on initialization which globally sets the agent instance to be suitable for non-blocking only or for blocking. It would be better to be able to choose the executor when sending a function to an agent.

OneByOne could be modified to ensure sequential execution of functions over two different executors.

@jdantonio
Copy link
Member

This sounds like a great improvement. Is this something you wanted to work on?

@pitr-ch
Copy link
Member Author

pitr-ch commented May 11, 2014

I'd like to focus on migrating Actress, but if I have spare time, or if I get stuck, or after migration is done, I'll do it if nobody is quicker :) I will assign myself to the issue if I'll start working on it.

@pitr-ch pitr-ch self-assigned this May 12, 2014
@pitr-ch pitr-ch closed this May 12, 2014
@pitr-ch pitr-ch reopened this May 12, 2014
@pitr-ch
Copy link
Member Author

pitr-ch commented May 12, 2014

closed by mistake

@pitr-ch
Copy link
Member Author

pitr-ch commented May 12, 2014

Please review. Open questions:

  • is post_off the best name?
  • can we improve executor option_parsing, so when :executor options is used the executor passed in is used for both task and operation

@jdantonio
Copy link
Member

  • The method name post_off sounds odd but I can't think of a better name. One option would be post! but that wouldn't be consistent with the post/post! behavior of ActorRef. I'll give it more thought but for now I think we can use post_off so that work can continue.
  • I'm comfortable with the changes you suggest to executor options parsing. That is a convenience method I added recently because I found myself duplicating code. I don't see any reason it can't evolve.

This PR broke the build for actors. Wrong number of arguments to the initializer for OneByOne. Can you please take a look at that?

Other than the broken tests I am comfortable with this PR. Please feel free to merge it.

@jdantonio
Copy link
Member

And I should also add: Thank you very much for this update!

@pitr-ch
Copy link
Member Author

pitr-ch commented May 12, 2014

  • missing doc
  • travis fixed

@jdantonio
Copy link
Member

@pitr-ch Is this PR ready to merge? I promised to create a pre-release build and I'd like to include this is you feel it's ready.

pitr-ch pushed a commit that referenced this pull request May 12, 2014
Support `send` and `send-off` methods for Agent
@pitr-ch pitr-ch merged commit 011ac51 into ruby-concurrency:master May 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding features, adding tests, improving documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants