Function core::atomic::fence
[−]
[src]
pub fn fence(order: Ordering)
An atomic fence.
A fence 'A' which has Release
`Releaseordering semantics, synchronizes with a fence 'B' with (at least)
` ordering semantics, synchronizes with a
fence 'B' with (at least) Acquire
`Acquire` semantics, if and only if there exists
atomic operations X and Y, both operating on some atomic object 'M' such
that A is sequenced before X, Y is synchronized before B and Y observes
the change to M. This provides a happens-before dependence between A and B.
Atomic operations with Release
`Releaseor
` or Acquire
`Acquire` semantics can also synchronize
with a fence.
A fence which has SeqCst
`SeqCstordering, in addition to having both
` ordering, in addition to having both Acquire
`Acquireand
`
and Release
`Releasesemantics, participates in the global program order of the other
` semantics, participates in the global program order of the
other SeqCst
`SeqCst` operations and/or fences.
Accepts Acquire
`Acquire,
`, Release
`Release,
`, AcqRel
`AcqReland
` and SeqCst
`SeqCst` orderings.
Panics
Panics if order
`orderis
` is Relaxed
`Relaxed`.