Closed LouisIV closed 4 years ago
Hi @LouisIV Do you mean like this:
async function main() {
...some synchronous code...
await doGet(callback => {
...log result... // <-- this line gets now executed BEFORE the below synchronous code block is reached
});
...some synchronous code... // <-- the whole function now behaves as if it was only using synchronous code
}
This type of code will work in IBM Cloud functions.
You only provide documentation for Promises. I have seen other IBM documentation that hints at async-await support.
For instance, can I do this?
Or can I even make
main
async directly?