Method CheckAccess
- Namespace
- SodaFlow.Bindable.ObjectModel
- Assembly
- SodaFlow.Core.Bindable.ObjectModel.dll
CheckAccess()
Whether the calling thread is the one this scheduler posts to.
bool CheckAccess()
Returns
Remarks
This answer is an estimate, and it is deliberately not symmetrical. An implementation that cannot tell MUST return true. An incorrect true has no cost, because it only gives up a diagnostic that was never a guarantee. An incorrect false throws on correct code. Answer false only when you know that the thread is the incorrect one.
A scheduler that has no thread of its own runs work on the thread that calls it. Such a scheduler answers true in all conditions.