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 IOWait callback for blocking IO operations #71

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bigbes
Copy link

@bigbes bigbes commented Oct 13, 2018

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.

@bigbes bigbes changed the title Add io wait callback for blockin io operations Add IOWait callback for blocking IO operations Oct 16, 2018
Add a io wait callback that will be called instead of base io
writing handlers.
@bigbes
Copy link
Author

bigbes commented Oct 25, 2018

Rebased onto latest branch, build fails with unrelated to patch problems.

9EOR9 added a commit that referenced this pull request Dec 1, 2018
Applied part of the patch from #71
The part for named pipes doesn't work, since wait_io was reworked by vvaintroub.
@9EOR9
Copy link
Collaborator

9EOR9 commented Dec 1, 2018

The patch for named pipe doesn't work, since wait_io was reworked recently by vvaintroub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants