How to make a function wait for an async operation before executing further code?
I have an async function my_func
that performs two operations: f
and g
. The f
operation sends data over a WebSocket and doesn’t return anything. The g
operation performs some computations and returns a value.