comparison COPYING @ 49212:90a15199cbc6

rust-repo: make `Send` by not storing functions in `LazyCell` We (Google) want to use `Repo` in a context where we can store it in `Mutex<Repo>`. However, that currently doesn't work because it's not `Send` because the `LazyCell` initialization functions are not `Send`. It's easy to fix that by passing them to the `get_or_init()` and `get_mut_or_init()` functions. We'll probably also want `Repo` to be `Send` (and even `Sync`) in core later, so this seems like a step in the right direction. Differential Revision: https://phab.mercurial-scm.org/D12582
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 21 Apr 2022 10:39:52 -0700
parents 8c8b55733cbd
children
comparison
equal deleted inserted replaced
49211:3cd3aaba5b03 49212:90a15199cbc6