Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@SilverMira
Copy link
Contributor

Currently, there is an unnecessary wait with recv_timeout() on reader thread and cache thread.

On reader thread, it causes reading from pipe to have an inherent 100ms wait time between each chunk read.
Similarly, cache thread also has this issue, where read() calls are served throttled with a 100ms delay.

This PR replaces recv_timeout with try_recv so all read() calls will return as soon as possible.

Fixes #75

Currently, there is an unnecessary wait with `recv_timeout()` on reader thread which causes reading from pipe to have an inherent 100ms wait time.

Similarly, cache thread also has this issue, where read() calls are served throttled with a 100ms delay
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.63%. Comparing base (dbbefcd) to head (5a8aab1).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #76      +/-   ##
==========================================
+ Coverage   77.57%   78.63%   +1.05%     
==========================================
  Files           7        7              
  Lines        1231     1231              
==========================================
+ Hits          955      968      +13     
+ Misses        276      263      -13     
Flag Coverage Δ
unittests 78.63% <100.00%> (+1.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andfoy andfoy merged commit 1ecee27 into andfoy:main Jun 28, 2024
@andfoy
Copy link
Owner

andfoy commented Jun 28, 2024

Thanks a lot for your contribution @SilverMira!

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.

Minimum of 100ms latency on .read() calls performed repeatedly

3 participants