{ "id": "172633", "key": "TIMOB-26574", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "20412", "name": "Release 8.1.0", "archived": false, "released": true, "releaseDate": "2019-08-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-05-15T19:25:19.000+0000", "created": "2018-11-16T16:52:45.000+0000", "epic": { "id": 172628, "key": "TIMOB-26570", "name": "Node Compatibility", "summary": "Node compatibility and developer experience", "color": { "key": "color_3" }, "done": false }, "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2019-05-28T13:57:41.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "setImmediate and clearImmediate are *sort of* like setTimeout/clearTimeout, but are supposed to be run after current I/O event callbacks are done.\r\n\r\nhttps://nodejs.org/api/timers.html#timers_setimmediate_callback_args\r\n\r\nBasically this is roughly like setTimeout(callback, 0); as a first stab, but should be run **before** and timeout callbacks.\r\n\r\nIn effect, immediate, timers and ticks from process.nextTick are *sort of* like 3 separate priorities of timer queues, although at a lower level they have semantic/behavioral differences. ticks are right away and can cause infinite loops. immediate come next chance after I/O events callbacks. Then timers get fired when ready.", "attachment": [], "flagged": false, "summary": "TiAPI: Implement set/clearImmediate", "creator": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "environment": null, "closedSprints": [ { "id": 1129, "state": "closed", "name": "2019 Sprint 10", "startDate": "2019-04-28T22:06:00.000Z", "endDate": "2019-05-17T22:06:00.000Z", "completeDate": "2019-05-20T16:48:42.522Z", "originBoardId": 114 }, { "id": 1136, "state": "closed", "name": "2019 Sprint 11", "startDate": "2019-05-18T17:39:52.830Z", "endDate": "2019-05-31T17:39:00.000Z", "completeDate": "2019-06-04T21:37:11.485Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "447823", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/10863", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-04-22T13:53:02.000+0000", "updated": "2019-04-22T13:53:02.000+0000" }, { "id": "448405", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to master with a suite of unit tests to verify behavior.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-05-15T19:25:19.000+0000", "updated": "2019-05-15T19:25:19.000+0000" }, { "id": "448681", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket*, fix verified in SDK version {{8.1.0.v20190524131922}}.\r\n\r\n*Tested with the following test case:* \r\n{code:java}\r\nsetImmediate((one, two, three) => {\r\n   console.log(one);\r\n   console.log(two);\r\n   console.log(three);\r\n}, 1, '2', [ 3 ]);\r\n\r\nconst immediate = setImmediate(() => {\r\n   console.log('Should not be called as it is cleared below');\r\n});\r\nclearImmediate(immediate);\r\n\r\n{code}\r\nOutput: \r\n{code:java}\r\n[INFO] \b\b \b 1\r\n[INFO] \b\b \b 2\r\n[INFO] \b\b \b [3]\r\n{code}\r\n\r\nTest and other information can be found at:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/10863\r\n\r\n*Test Environment*\r\n{code:java}\r\niphone 6s+ (12.2)\r\nPixel XL (7.1.1)\r\n7.0.12-70X.4\r\nOperating System Name: Mac OS Mojave\r\nOperating System Version: 10.14.2\r\nNode.js Version: 8.11.3\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-05-28T13:57:26.000+0000", "updated": "2019-05-28T13:57:26.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }