forked from TraceMachina/nativelink
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid invalid Send trait in evicting_map.
The evict_items was async which caused an invalid Send trait to be required on functions that use it. This was detected by wrapping the asyncio Mutex with a std::sync::Mutex such that the compiler could detect the invalid usage. There was a valid usage by manually calling drop(state) in get and size_for_key, however, a bug in the compiler (rust-lang/rust#57478) meant that refactoring this allows the compiler to better understand the lock.
- Loading branch information
1 parent
dd89850
commit 0eacfb7
Showing
1 changed file
with
29 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters