Thanks Dom, good to know these sort of implementation details.
> withTimeout doesn't cancel the dataEvt future
Similarly, does it mean that an or composite future will suffer from the same
issue?
> why are you doing this?
No particular reason, just testing to see how resilient the whole thing is. The
processClient type routines may be well doing something else (short maintenance
task) till new data becomes available.
> closing a socket that is awaiting on a read in another async proc is safe
OK, what about deleting the client object from the global array? I would have
thought that in this particular case other instances of processClient may
carry-on looping through clients list via
for c in clients:
await c.send(line)
Run
after one client disconnected and thus it may actually access invalid data.
Would clients.delete(i) requires some sort of locking?