- Notifications
You must be signed in to change notification settings - Fork 8
MainThreadDispatcher API
supermax edited this page Jun 28, 2020
·
1 revision
Main Thread dispatcher is responsible for the synchronisation of callbacks between Main and other threads.
publicinterfaceIThreadDispatcher{// managed Thread IDintThreadId{get;}// dispatch - adds callback delegate into dispatcher’s queue// action - delegate reference to method that should be invoked on main thread// payload - the data that should be passed to the method/callbackvoidDispatch(Delegateaction,object[]payload);}MainThreadDispatcher.Default.Dispatch(Callback,newobject[]{payload,state});