TCA.useAsyncAPI
Notifies the execution engine that an asynchronous API will be invoked, so that the engine waits for completion notification.
Note: Generally there is no need to call this function because the execution engine knows to wait for asynchronous operation completion when the user calls an asynchronous API. Use this function only when an asynchronous API is invoked in an asynchronous execution block, such as setTimeout. This function should be called outside of an asynchronous execution block, preferably at the beginning of the whole
TCA.useAsyncAPI();
Arguments
None
Return value
None
Example
TCA.useAsyncAPI();
setTimeout(function() {
IOA.read(TC.scriptDir + "mylog.txt").then(function(data){
TCA.done(data);
}).catch(function (error) {
TCA.doneWithError(error);
});
}, 1000);