This is an archive of the discontinued Mercurial Phabricator instance.

rust-pathauditor: use interior mutability for use in multi-threaded contexts
ClosedPublic

Authored by Alphare on Mar 4 2020, 9:45 AM.

Details

Summary

The usual recommendation for using RwLock or Mutex is that if there are
about as many write as there are reads, use Mutex, and if there are more
reads than writes, use RwLock.

If after the main bottleneck (i.e. parallel traversal) is removed this shows
up on profiles, we should investigate using the parking_lot since we don't
need a poisoning API, or maybe move to different types of caches entirely.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Alphare created this revision.Mar 4 2020, 9:45 AM
Alphare updated this revision to Diff 20449.Mar 4 2020, 9:57 AM
Alphare updated this revision to Diff 20456.Mar 4 2020, 10:08 AM
Alphare updated this revision to Diff 20499.Mar 5 2020, 3:34 AM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.