Struct Request Copy item path Source pub struct Request {
next: AtomicPtr <Behavior >,
scheduled: AtomicBool ,
target: Arc <dyn CownBase >,
}Expand description Pointer to the next scheduled behavior.
Is this request scheduled?
The cown that this request wants to access.
This is an Arc as the all exposed CownPtrs may have been dropped while the behavior is
still scheduled.
Start the first phase of the 2PL enqueue operation.
Enqueues self onto the target cown. Returns once all previous behaviors on this cown has
finished enqueueing on all of its required cowns. This ensures the 2PL protocol.
§ SAFETY
behavior must be a valid raw pointer to the behavior for self, and this should be the
only enqueueing of this request and behavior.
Finish the second phase of the 2PL enqueue operation.
Sets the scheduled flag so that subsequent behaviors can continue the 2PL enqueue.
§ Safety
All enqueues for smaller requests on this cown must have been completed.
Release the cown to the next behavior.
Called when self has been completed, and thus can allow the next waiting behavior to run.
If there is no next behavior, then the cown’s tail pointer is set to null.
§ Safety
self must have been actually completed.
Formats the value using the given formatter.
Read more Compares and returns the maximum of two values.
Read more Compares and returns the minimum of two values.
Read more Restrict a value to a certain interval.
Read more Tests for self and other values to be equal, and is used by ==.
Tests for !=. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
This method returns an ordering between
self and
other values if one exists.
Read more Tests less than (for
self and
other) and is used by the
< operator.
Read more Tests less than or equal to (for
self and
other) and is used by the
<= operator.
Read more Tests greater than (for
self and
other) and is used by the
>
operator.
Read more Tests greater than or equal to (for
self and
other) and is used by
the
>= operator.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer.
Read more Mutably dereferences the given pointer.
Read more Drops the object pointed to by the given pointer.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.