fix(runtime): support older stable Rust atomic updates
Intrepid/Prometeu/Runtime/pipeline/head This commit looks good
Intrepid/Prometeu/Runtime/pipeline/head This commit looks good
This commit is contained in:
@@ -16,9 +16,11 @@ impl PublicationControl {
|
||||
pub fn publication_attempted(&self) -> bool {
|
||||
self.0.load(Ordering::SeqCst) & 1 != 0
|
||||
}
|
||||
// `try_update` requires Rust 1.95; keep older stable CI toolchains compatible.
|
||||
#[allow(deprecated)]
|
||||
fn enter(&self) -> Result<()> {
|
||||
self.0
|
||||
.try_update(Ordering::SeqCst, Ordering::SeqCst, |state| {
|
||||
.fetch_update(Ordering::SeqCst, Ordering::SeqCst, |state| {
|
||||
if state & 2 == 0 { Some(state | 1) } else { None }
|
||||
})
|
||||
.map(|_| ())
|
||||
|
||||
Reference in New Issue
Block a user