Mercurial > hg
comparison mercurial/changegroup.py @ 49177: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 | 642e31cb55f0 |
children | d44e3c45f0e4 |
comparison
equal
deleted
inserted
replaced
49176:3cd3aaba5b03 | 49177:90a15199cbc6 |
---|