Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Threading.Barrier Class Reference

Public Member Functions

 Barrier (int participantCount)
 
 Barrier (int participantCount, Action< Barrier >? postPhaseAction)
 
long AddParticipant ()
 
long AddParticipants (int participantCount)
 
void RemoveParticipant ()
 
void RemoveParticipants (int participantCount)
 
void SignalAndWait ()
 
void SignalAndWait (CancellationToken cancellationToken)
 
bool SignalAndWait (TimeSpan timeout)
 
bool SignalAndWait (TimeSpan timeout, CancellationToken cancellationToken)
 
bool SignalAndWait (int millisecondsTimeout)
 
bool SignalAndWait (int millisecondsTimeout, CancellationToken cancellationToken)
 
void Dispose ()
 

Protected Member Functions

virtual void Dispose (bool disposing)
 

Properties

int ParticipantsRemaining [get]
 
int ParticipantCount [get]
 
long CurrentPhaseNumber [get, set]
 

Private Member Functions

void GetCurrentTotal (int currentTotal, out int current, out int total, out bool sense)
 
bool SetCurrentTotal (int currentTotal, int current, int total, bool sense)
 
void FinishPhase (bool observedSense)
 
void SetResetEvents (bool observedSense)
 
void WaitCurrentPhase (ManualResetEventSlim currentPhaseEvent, long observedPhase)
 
bool DiscontinuousWait (ManualResetEventSlim currentPhaseEvent, int totalTimeout, CancellationToken token, long observedPhase)
 
void ThrowIfDisposed ()
 

Static Private Member Functions

static void InvokePostPhaseAction (object obj)
 

Private Attributes

volatile int _currentTotalCount
 
long _currentPhase
 
bool _disposed
 
readonly ManualResetEventSlim _oddEvent
 
readonly ManualResetEventSlim _evenEvent
 
readonly ExecutionContext _ownerThreadContext
 
readonly Action< Barrier_postPhaseAction
 
Exception _exception
 
int _actionCallerID
 

Static Private Attributes

static ContextCallback s_invokePostPhaseAction
 

Detailed Description

Definition at line 7 of file Barrier.cs.


The documentation for this class was generated from the following file: