Or you could promisify the send function and use normal async/await.
let q = Promise.resolve(), sendAsync = (p) => new Promise(r => send(p, r)), sendOnce = (p, c, ms) => setTimeout(_ => q.then(_ => sendAsync(p)).then(c), ms)
Or you could promisify the send function and use normal async/await.
Or you could actually spin up a new worker thread and get multithreading :P