Lean  $LEAN_TAG$
QuantConnect.Util.KeyStringSynchronizer Class Reference

Helper class to synchronize execution based on a string key More...

Public Member Functions

void Execute (string key, bool singleExecution, Action action)
 Execute the given action synchronously with any other thread using the same key More...
 
Execute< T > (string key, Func< T > action)
 Execute the given function synchronously with any other thread using the same key More...
 

Detailed Description

Helper class to synchronize execution based on a string key

Definition at line 26 of file KeyStringSynchronizer.cs.

Member Function Documentation

◆ Execute()

void QuantConnect.Util.KeyStringSynchronizer.Execute ( string  key,
bool  singleExecution,
Action  action 
)

Execute the given action synchronously with any other thread using the same key

Parameters
keyThe synchronization key
singleExecutionTrue if execution should happen only once at the same time for multiple threads
actionThe action to execute

Definition at line 36 of file KeyStringSynchronizer.cs.

◆ Execute< T >()

T QuantConnect.Util.KeyStringSynchronizer.Execute< T > ( string  key,
Func< T >  action 
)

Execute the given function synchronously with any other thread using the same key

Parameters
keyThe synchronization key
actionThe function to execute

Definition at line 46 of file KeyStringSynchronizer.cs.


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