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

[WIP] Async operations overhaul #3489

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

andranik-s
Copy link
Contributor

@andranik-s andranik-s commented Mar 4, 2020

Improvements compared to existing implementation:

  1. Easier to add new types of async requests since this implementation just calls a UA_Service in a worker thread. Especially easy if splitting a request into several operations is not required.
  2. No manual request queue processing by users (no UA_Server_getAsyncOperationNonBlocking, etc.). Just call UA_Server_runAsync in a worker thread.
  3. Uses condvars to wake up workers. With existing implementation worker threads need to repeatedly sleep for some period and check the request queue

Note:
It is not tested for Windows (I do not have access to it currently)

@andranik-s andranik-s force-pushed the async_ops3 branch 2 times, most recently from 4b3505b to 0bc6025 Compare March 11, 2020 09:11
@andranik-s
Copy link
Contributor Author

Added async history requests to demonstrate the extensibility of this approach

@andranik-s andranik-s changed the title [WIP] Async operations overhaul [Review] Async operations overhaul Mar 11, 2020
@andranik-s andranik-s force-pushed the async_ops3 branch 2 times, most recently from 6b49eae to 809ed06 Compare March 12, 2020 07:31
@andranik-s andranik-s changed the title [Review] Async operations overhaul [WIP] Async operations overhaul Mar 13, 2020
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

Successfully merging this pull request may close these issues.

None yet

1 participant