Skip to content

bitswap: messagequeue: lock only needed sections - #787

Merged
gammazero merged 1 commit into
mainfrom
bslocks
Jan 15, 2025
Merged

gammazero merged 1 commit into
mainfrom
bslocks

Conversation

@hsanjuan

Copy link
Copy Markdown
Contributor

A couple of locks here seem to lock also while doing things like sending things on channels. This seems prone to deadlocks and is wasteful.

A couple of locks here seem to lock also while doing things like sending
things on channels. This seems prone to deadlocks and is wasteful.
@hsanjuan hsanjuan self-assigned this Jan 10, 2025
@hsanjuan
hsanjuan requested a review from a team as a code owner January 10, 2025 20:07
@codecov

codecov Bot commented Jan 10, 2025 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 60.48%. Comparing base (6397847) to head (a3e4570).
Report is 1 commits behind head on main.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #787      +/-   ##
==========================================
+ Coverage   60.46%   60.48%   +0.01%     
==========================================
  Files         245      245              
  Lines       31133    31138       +5     
==========================================
+ Hits        18826    18834       +8     
- Misses      10627    10629       +2     
+ Partials     1680     1675       -5     
Files with missing lines Coverage Ξ”
...tswap/client/internal/messagequeue/messagequeue.go 85.44% <100.00%> (+0.13%) ⬆️

... and 13 files with indirect coverage changes

@gammazero gammazero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last unlock may be important if this ever blocks:

mq.events <- messageFinishedSending

@gammazero
gammazero merged commit 11b5100 into main Jan 15, 2025
@gammazero
gammazero deleted the bslocks branch January 15, 2025 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants