Amnesia.SessionTracker.ParallelDependentActivityIdentified C# (CSharp) Method

ParallelDependentActivityIdentified() public method

Called by the thread that is initiating an async activity on a second thread.
public ParallelDependentActivityIdentified ( ) : ActivityInfo
return ActivityInfo
        public ActivityInfo ParallelDependentActivityIdentified()
        {
            var activity = CurrentThreadActivity;
            if (activity == null)
                throw new InvalidOperationException("Expected to join into an existing activity but there is not one");

            lock (fieldsLock)
            {
                ++activity.ThreadCount;
            }

            return activity;
        }

Usage Example

Exemplo n.º 1
0
 public ParallelActivity(SessionTracker tracker)
 {
     this.tracker = tracker;
     this.activity = tracker.ParallelDependentActivityIdentified();
 }
All Usage Examples Of Amnesia.SessionTracker::ParallelDependentActivityIdentified