Class YieldToken
Token to observe requests to yield execution.
Inheritance
Implements
Namespace: Reaqtive.Scheduler
Assembly: Reaqtive.Interfaces.dll
Syntax
public sealed class YieldToken : ValueType, IEquatable<YieldToken>
Constructors
YieldToken(IYieldTokenSource)
Creates a new YieldToken value using the specified yield token
source
to check for yield requests.
Declaration
public YieldToken(IYieldTokenSource source)
Parameters
Type | Name | Description |
---|---|---|
IYieldTokenSource | source | The yield token source used to check for yield requests. |
Properties
IsYieldRequested
Gets whether yielding has been requested for this token.
Declaration
public bool IsYieldRequested { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
None
Returns an empty YieldToken value.
Declaration
public static YieldToken None { get; }
Property Value
Type | Description |
---|---|
YieldToken |
Methods
Equals(YieldToken)
Determines whether the current YieldToken instance is equal to the specified System.Object.
Declaration
public bool Equals(YieldToken other)
Parameters
Type | Name | Description |
---|---|---|
YieldToken | other | The other YieldToken to which to compare this instance. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Equals(Object)
Determines whether the current YieldToken instance is equal to the specified System.Object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The other object to which to compare this instance. |
Returns
Type | Description |
---|---|
System.Boolean |
|
GetHashCode()
Serves as a hash function for a YieldToken.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for the current YieldToken instance. |
Operators
Equality(YieldToken, YieldToken)
Determines whether two YieldToken instances are equal.
Declaration
public static bool operator ==(YieldToken left, YieldToken right)
Parameters
Type | Name | Description |
---|---|---|
YieldToken | left | The first instance. |
YieldToken | right | The second instance. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Inequality(YieldToken, YieldToken)
Determines whether two YieldToken instances are not equal.
Declaration
public static bool operator !=(YieldToken left, YieldToken right)
Parameters
Type | Name | Description |
---|---|---|
YieldToken | left | The first instance. |
YieldToken | right | The second instance. |
Returns
Type | Description |
---|---|
System.Boolean |
|