Add IOWait callback for blocking IO operations #71
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.
Add a io wait callback that will be called instead of base io writing handlers.
We use mariadb-connector-c for our mariadb/mysql connector https://github.com/tarantool/mysql for tarantool nosql database https://github.com/tarantool/tarantool.
Mariadb connector uses own internal fiber implementation for async operations and need to special wrap for async api function (_start/_cont), but tarantool already has it own fibers.
I added one option for mysql connection that allowed callback from pvio objects for io polling, in this case standart api calls can be used asynchronously without wrapping, because we will need to call some more methods that already exist in future (ex. for replication from mariadb databases).
Little example can be found at our git repo https://github.com/tarantool/mysql/blob/master/mysql/driver.c
This PR fixes reviews in #23. Sorry, I was forced to open new PR, since I haven't got access to old repo. I've fixed @9EOR9 remarks from old PR.