When you only have a hammer, all you see is nails.
Below are examples in other programming languages of how to write async code based on this javascript example:
processData is a synchronous function that needs to have work done by an async function simulatedAsyncWork
Below are examples in other programming languages of how to write async code based on this javascript example:
processData is a synchronous function that needs to have work done by an async function simulatedAsyncWork
Full working code can be found here:
https://github.com/AlanU/cross-platform-code-examples/tree/main/async/future-promise
https://github.com/AlanU/cross-platform-code-examples/tree/main/async/future-promise