Where to set a timeout on a task

hi there

Has anyone got an effective approach to setting a timeout on multiple async calls.

So if I send out 10 calls each with it’s own id and timer. I would handle the callback in a wrapper.

Can I determine WHICH timer blew from the call id or is there a better way?

an example usecase

send 10 requests to a weather service each asking for a realtime data on a different city.

set up a wrapper to handle the returning data stream

if a datastream does not start then retry original a call unless number of retries exceeded for that call.

I’m not sure it’s supported in general, but at least see this thread (with a macro to do it, I didn’t read carefully, may only work in some cases, or info there outdated?):

It seems to be supported in some other languages (so maybe reasonable to think should work in all cases in Julia?):

1 Like

THANK YOU @Palli !!! This was the clincher for me from hhaensel

Really helped. Thanks both
dent