Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25344] Windows: New Timer implementation

GitHub Issuen/a
TypeStory
PriorityMedium
StatusClosed
ResolutionWon't Do
Resolution Date2018-07-26T03:51:43.000+0000
Affected Version/sRelease 6.2.0
Fix Version/sn/a
ComponentsWindows
Labelsn/a
ReporterKota Iguchi
AssigneeKota Iguchi
Created2017-09-26T00:55:39.000+0000
Updated2018-07-26T03:51:43.000+0000

Description

According to the studies from TIMOB-25019, we found some pitfalls in current setTimeout/setInterval implementations. There may be rare chances to encounter but we want simpler/faster/safer implementation for it. - Make sure to clear callback right after callback is actually called from setTimeout. - Invoke callback immediately when interval equals zero. It had synchronization issue with clearTimeout/clearInterval. - Xaml::DispatcherTimer functions should have been called from UI thread. Use ThreadPoolTimer when possible, because it doesn't have the issue. - With ThreadPoolTimer, make sure to invoke callback from UI thread. Note that this is about internal implementation, so the API functionalities setTimeout/setInterval/clearTimeout/clearInterval should not be changed.

Comments

  1. Kota Iguchi 2017-09-26

    https://github.com/appcelerator/titanium_mobile_windows/pull/1116
  2. Kota Iguchi 2018-07-26

    Closing this, as current Timer implementation doesn't actually cause issues.

JSON Source