Mercurial > hg-stable
view .clang-format @ 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 | d0a3fa849cb8 |
children |
line wrap: on
line source
BasedOnStyle: LLVM IndentWidth: 8 UseTab: ForIndentation BreakBeforeBraces: Linux AllowShortIfStatementsOnASingleLine: false IndentCaseLabels: false AllowShortBlocksOnASingleLine: false AllowShortFunctionsOnASingleLine: false IncludeCategories: - Regex: '^<' Priority: 1 - Regex: '^"' Priority: 2