Skip to content

AsyncActions

Ca5an0va edited this page Dec 15, 2017 · 6 revisions

AsyncActions is a SignalGo class that helps you to run a method in another thread. This is the typical usage:

                AsyncActions.Run(() =>
                {
                    //your code
                }, (ex) =>
                {
                    //when your code have exception
                });

Please note that since code will run in another thread be carefull when refreshing UI controls present in this Action!! You must use BeginInvoke/EndInvoke patterns for UI controls!

AsyncActions IS NOT awaitable. So your code runs in parallel with other code if AsyncActionsis hosted in a method with other code after the AsyncActions itself.

Clone this wiki locally