type AtomicOrdering = enum { MONOTONIC, ACQUIRE, RELEASE, ACQ_REL, SEQ_CST, }
Enum to specify the different atomic orderings. All orderings guarantee atomicity. Use of any ordering other than SEQ_CST should only be done if the developer is 100% sure it is safe to do so.
Has no synchronization or ordering constraints. Can be used on any atomic operation.
This is equivalent to "relaxed" in C/C++.
No memory operations in the current thread can be reordered to before this operation. Can be used on load atomic operations.
No memory operations in the current thread can be reordered to after this operation. Can be used on store atomic operations.
Acquire Release. Performs an acquire and a release operation. No memory operations in the current thread can be reordered to before acquire or to after the release. Can be used on read-modify-write atomic operation.
Sequentially-consistent. Performs an acquire for a load, a release for a store, acquire-release for a read-modify-write operation. In addition, all threads observe all modifications in the same order. Can be used on any atomic operation.
type AtomicRMWOp = enum { XCHG, ADD, SUB, AND, NAND, OR, XOR, MIN, MAX, }
For use in @atomicRMW to denote the operation to use.
interface IIterable = { func createIterator = (this) -> impl($$:@pthr.IIterator); func createIterator = (this mut) -> impl($$:@pthr.IMutIterator); } interface IIterableRT = { func createIterator = (this) #rt -> impl($$:@pthr.IIterator); func createIterator = (this mut) #rt -> impl($$:@pthr.IMutIterator); }
Interface to define iterable types. Should be used if the type uses the array iterable model.
interface IIterableRef = { func createIterator = (this) -> impl($$:@pthr.IIterator); } interface IIterableRefRT = { func createIterator = (this) #rt -> impl($$:@pthr.IIterator); }
Interface to define iterable types. Should be used if the type uses the array reference iterable model.
interface IIterableMutRef = { func createIterator = (this) -> impl($$:@pthr.IMutIterator); } interface IIterableMutRefRT = { func createIterator = (this) #rt -> impl($$:@pthr.IMutIterator); }
Interface to define iterable types. Should be used if the type uses the mutable array reference iterable model.
interface IIterator = { func next = (this mut) -> Void; func get = (this) -> $$*; func atEnd = (this) -> Bool; } interface IIteratorRT = { func next = (this mut) #rt -> Void; func get = (this) #rt -> $$*; func atEnd = (this) #rt -> Bool; }
Interface to define an iterator.
interface IMutIterator = { func next = (this mut) -> Void; func get = (this) -> $$*mut; func atEnd = (this) -> Bool; } interface IMutIteratorRT = { func next = (this mut) #rt -> Void; func get = (this) #rt -> $$*mut; func atEnd = (this) #rt -> Bool; }
Interface to define a mut iterator.