On Wed May 3 13:39:41 2023 +0000, Nikolay Sivov wrote:
Okay, another thing that we should consider I think, is to get rid of separate work queue for every source object. That did create problems before, when application created too many sources failing to respond to errors and exhausted maximum possible number of user queues. There is a MFLockSharedWorkQueue() that could be used here.
Yes, I also want to use the standard queues for the callbacks at some point.
I'm considering using a multi-threaded queue for the sample requests, as it would be simpler to have them wait on a condition variable rather than managing a list, but I'm not completely sure how bad it would be to occupy a thread for each pending request.
As an alternative I have seen that there's some event-based work items, which could probably be used without unnecessary resource occupation.