-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
I have a quick question. In the IoManager the function that retrieves a response uses timeouts in a non-intuitive way.
If I call it with a timeout of 10 seconds, it always blocks for the full 10 seconds, even if the response arrives immediately. This negatively affects performance, because each call takes the full timeout duration. I understand that I can set the timeout to 0 seconds, but then I have to implement throttling on the caller side to avoid spinning the CPU in a tight loop.
Would it be possible to introduce a flag that changes this behavior so that, if a timeout is specified, the function waits up to that duration for a response but returns as soon as a response is available?
If this sounds reasonable, I can prepare a PR.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels