Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1330] Include async as a built-in library

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsBuiltins
Labelsn/a
ReporterFokke Zandbergen
AssigneeBruce Wayne
Created2015-11-13T10:24:04.000+0000
Updated2017-03-07T16:00:01.000+0000

Description

Enabling JS to run on the main thread may cause unexpected behaviour because calls on Ti Proxies will wait to be executed until the current JS codeblock is done. The remedy is to break up long procedures using setTimeout(fn, 0) or UnderScore's wrapped _.defer(). We already have underscore in Alloy, but in particular when looping over an Array the code is more clean if you use something like the async-library. To make it easier for developers to implement best practices as we will eventually make main thread the default, we should include async as a built-in for Alloy. https://www.npmjs.com/package/async

Comments

  1. Creative 2017-03-07

JSON Source