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

Thread safety #5

Closed
konstin opened this issue Oct 7, 2016 · 2 comments
Closed

Thread safety #5

konstin opened this issue Oct 7, 2016 · 2 comments
Labels

Comments

@konstin
Copy link
Member

konstin commented Oct 7, 2016

Due to the big number of network requests that has to be made and the unavoidable waiting times it gives important performance improvements to parallelize API request. Therefore I'ld like to know if or how the library can be used with multi-threading. The answer should be added to the documentation.

@grindhold
Copy link
Member

grindhold commented Oct 7, 2016

konstin: the library emits the resolve_url signal everytime it needs something from teh interwebs. this lets you decide how to handle/queue/parallelize the upcoming requests in your application code. the parse methods (and thus writing operations) are called once per object. when you implement an OParl.Cache in your code, this can be regarded as guaranteed, so i think no additional locks are necessary.

@grindhold
Copy link
Member

soooo. i now ran into (and immediately fixed) the first race condition problem.
i currently develop a threaded program against the lib, so this will be
tested as of now.
i am closing this issue as it is not an open question anymore. some work on
thread-safety has to happen.

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

No branches or pull requests

2 participants