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

Investigate asynchronous fallback actions #36

Closed
whitfin opened this issue Jun 11, 2016 · 3 comments
Closed

Investigate asynchronous fallback actions #36

whitfin opened this issue Jun 11, 2016 · 3 comments
Assignees

Comments

@whitfin
Copy link
Owner

whitfin commented Jun 11, 2016

Fallbacks are currently executed inside the worker itself, which sucks when you have a long-running fallback. We should investigate how to deal with them asynchronously.

I think that maybe returning { :deferred, task } to the calling process is the way to go, and then you can just await on the task. The only problem with this is that async: true calls will never receive this reply... so it needs thinking about.

This would naturally be optional - it might be that you want to block the worker.

@whitfin whitfin self-assigned this Jun 11, 2016
@whitfin
Copy link
Owner Author

whitfin commented Jun 11, 2016

Duh, I just realised that async: true calls are only on things which don't return values, so there's no fallback.

@whitfin
Copy link
Owner Author

whitfin commented Jun 11, 2016

This might not be viable due to the use case of transactions... Will revisit shortly.

@whitfin
Copy link
Owner Author

whitfin commented Jun 11, 2016

This will be made redundant by the changes coming for pooling in #37, so I'm going to close this. It can be revisited in future, but at this point the gain isn't big enough for the churn.

@whitfin whitfin closed this as completed Jun 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant