Skip to content
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

Invalidate the block on call completion #245

Closed
wants to merge 1 commit into from

Conversation

halorgium
Copy link
Contributor

When calling a method on an Actor from a normal Thread, if you invoke a block after the Call has completed, you will encounter a deadlock.

This is due to the fact the sending Thread is no longer waiting for the block invocations.
gist

If you are calling from an Actor, this behaviour works.
gist

This change invalidates the block for both scenarios.
We can allow block invocations in the actor case by only invalidating if the sender is a normal Thread.

  • Specs
  • Remove extra FIXMEs
  • Consider async/future + blocks with respect to invalidation

@coveralls
Copy link

Coverage Status

Coverage increased (+0%) when pulling b3422fa on invalidate-block-on-call-complete into 963245c on master.

@halorgium
Copy link
Contributor Author

This should probably be backported to 0.14 too.
The issue was originally reported there and will cause confusion.

@tarcieri
Copy link
Member

@halorgium what's the story with this?

@halorgium
Copy link
Contributor Author

@tarcieri basically, the current patch is overly (?) aggressive in disallowing use of the block.

I think we should allow use of a block after the initial method call has been completed.
This does mean that if the actor which originally invoked the method dies, the call to the block could potentially hang.
Given that we could check the mailbox is still alive before sending the BlockCall as we do for SyncCall.

@ghost ghost assigned halorgium Nov 29, 2013
@digitalextremist
Copy link
Member

@niamster do you feel like this could be part of the same thinking behind resolving #463?

@digitalextremist digitalextremist modified the milestones: 1.0, 0.19.0 Aug 7, 2015
@digitalextremist digitalextremist modified the milestones: 0.19.0, 0.17.5 Aug 29, 2015
@halorgium halorgium removed their assignment Feb 22, 2016
@digitalextremist digitalextremist modified the milestones: 0.18.0, 0.17.5 Jun 6, 2016
@tarcieri
Copy link
Member

This is woefully out of date. Closing.

@tarcieri tarcieri closed this Nov 27, 2016
@tarcieri tarcieri deleted the invalidate-block-on-call-complete branch November 27, 2016 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants