Mercurial > hg-stable
view .arcconfig @ 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 | ff396501e841 |
children |
line wrap: on
line source
{ "conduit_uri": "https://phab.mercurial-scm.org/api", "phabricator.uri": "https://phab.mercurial-scm.org/", "repository.callsign": "HG", "arc.land.onto.default": "@", "base": "hg:.^" }