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

add Callback to construct callback stack #21

Open
yinweiishere opened this issue Dec 7, 2016 · 2 comments
Open

add Callback to construct callback stack #21

yinweiishere opened this issue Dec 7, 2016 · 2 comments

Comments

@yinweiishere
Copy link
Contributor

Background:
From one handler to the other, the two thread pools are synced by the blocking event queue.
Usually, event will be piped to the last handler and thus finishes the whole handling.
But some handlers may expect post handler's result, no matter success or error. Especially, it will facilitate error handling.
Say, in SG client, connection will generate the original journal entry. For any of its post handlers: processor or writer, any failure inside could call connection's callback to reply success/error to iscsi.
Callbacks could be pushed into the event's context as a stack, and thus be called one by one.

@yinweiishere
Copy link
Contributor Author

background:
controller needs wait for entry being processed by writer.
We need callback after entry persisted.

walk around:
condition wait

TBD:
optimize to implement callback mechanism.

@yinweiishere
Copy link
Contributor Author

will work on it next week

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

2 participants