Skip to content

Implement Readable/Writeable for RwLock wrappers #2632

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

Merged

Conversation

TheBlueMatt
Copy link
Collaborator

We now support separate R/W locks in LockableScore, which allow
us to do routefinding in parallel, however in order to support
WriteableScore for such users we need to implement Writeable
for RwLock wrappers around Writeable types, which we do here.

This is required to use RwLock around ProbabilisticScorer in ldk-sample.

We now support separate R/W locks in `LockableScore`, which allow
us to do routefinding in parallel, however in order to support
`WriteableScore` for such users we need to implement `Writeable`
for `RwLock` wrappers around `Writeable` types, which we do here.
@TheBlueMatt TheBlueMatt added this to the 0.0.117 milestone Sep 30, 2023
@codecov-commenter
Copy link

codecov-commenter commented Sep 30, 2023

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (20f287f) 89.09% compared to head (783e255) 89.05%.

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2632      +/-   ##
==========================================
- Coverage   89.09%   89.05%   -0.05%     
==========================================
  Files         112      112              
  Lines       86932    86939       +7     
  Branches    86932    86939       +7     
==========================================
- Hits        77456    77420      -36     
- Misses       7246     7284      +38     
- Partials     2230     2235       +5     
Files Coverage Δ
lightning-background-processor/src/lib.rs 86.39% <ø> (ø)
lightning/src/ln/channelmanager.rs 81.63% <ø> (-0.02%) ⬇️
lightning/src/util/ser.rs 76.36% <0.00%> (-0.80%) ⬇️

... and 9 files with indirect coverage changes

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

This switches the locks used around `ProbabilisticScorer` in
`Simple*ChannelManager` type aliases to `RwLock`.
@TheBlueMatt TheBlueMatt force-pushed the 2023-09-writeable-rwlock branch from 0d7c552 to 783e255 Compare September 30, 2023 18:04
@TheBlueMatt TheBlueMatt merged commit a938fec into lightningdevkit:main Oct 3, 2023
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.

5 participants