Forum Xamarin Xamarin.Forms

Device.StartTimer, does it run on the UI thread?

PhilipOGormanPhilipOGorman USMember ✭✭✭

Does the call back function get executed on the UI thread?

Thanks!

Tagged:

Best Answer

  • AdamPAdamP AUUniversity ✭✭✭✭✭
    edited April 2016 Accepted Answer

    @PhilipOGorman

    Windows = DispatcherTimer = Yes
    iOS = NSRunLoop/NSTimer = Yes
    Android = Timer = No (but they wrap the callback in BeginInvokeOnMainThread), hence = Yes

    All callback threads on the StartTimer runs on the UI Thread.

Answers

Sign In or Register to comment.