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

Multiple concurrent python calls #93

Open
ashot opened this issue Aug 23, 2023 · 3 comments
Open

Multiple concurrent python calls #93

ashot opened this issue Aug 23, 2023 · 3 comments

Comments

@ashot
Copy link

ashot commented Aug 23, 2023

Does the bridge support multiple concurrent calls to python without blocking? For example in the context of a server?

It seems the current behavior is to block and wait for each call to complete serially. Is it possible to do, if not is there a workaround?

Thanks for the great library!

@ikb42
Copy link

ikb42 commented Nov 9, 2023

Hi @ashot did you get any further with this?

@extremeheat
Copy link
Owner

It depends if the Python call is blocking the main thread or not. If it is, then yes no further calls can be done on that thread. Otherwise yes, if it's asynchronous in that there is a callback invokes after queueing a job in async or threading, then other calls to python can be made concurrently.

@ashot
Copy link
Author

ashot commented Nov 21, 2023

Hi @ashot did you get any further with this?

This library is not the right solution if you need multiple async calls. I ended up running a flask process and writing a simple bridge back and forth via http, you can also setup thrift or protocol buffers if you want typing.

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

No branches or pull requests

3 participants