Last active
August 29, 2015 14:02
-
-
Save renestein/d589943e2e3357f40184 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public virtual int Run() | |
{ | |
checkIfDisposed(); | |
return runTasks(withWorkCancelToken()); | |
} | |
private CancellationToken withWorkCancelToken() | |
{ | |
lock (m_workLockObject) | |
{ | |
return (existsWork() | |
? m_workCancelTokenSource.Token | |
: withoutCancelToken()); | |
} | |
} | |
private CancellationToken withoutCancelToken() | |
{ | |
return CancellationToken.None; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment