-
Notifications
You must be signed in to change notification settings - Fork 47
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 async interfaces #41
Comments
Hi, I needed this async feature on my project so I went for a thread based implementation. I can PR you the code if you want because indeed pygdbmi is much much faster. However as I only needed async primitives (I can provide sync interface at a higher level in my project) I changed the interface and I would like to quickly discuss the interface so I can make a clean PR. The interface is currently:
My problem is that my implementation is thread based and I'm not sure how it can be compatible with code already written by the community. There is no timeout anywhere in my implementation so I think synchronous code already written with timeouts wont work with this. |
Hey @barollet Thanks |
Hi, I think it fixes your problem. You read response dicts one by one with no timeout with a blocking read or a non-blocking read so you can stop reading when you have a end of command or something. I have this kind of code in my project: write a command then read the result until the end of the result is received. I don't have answers from the pygdbmi developers so maybe I will open a pull request with the code so you can access it and they can tell me what I need to change for the change to be accepted. |
@matkuki I added a pull request. I just put my local code in the fork before sending the pull request. I really only tested it on my machine for my project so if you have some issue maybe you can contact me by email to be sure to have a quick answer. |
@barollet |
Add async alternatives to all sync methods. This will make pygdbmi more efficient because it will be event-based, not polling based.
The text was updated successfully, but these errors were encountered: