As was true in 2017 from the link in OP’s post, and still remains true today, Julia uses non-blocking I/O for all streams, since Julia is green threaded (uses Tasks instead of threads):
@phma the answers to all of your questions will be the same: use a task in some form (@async
or Threads.@spawn
are the most common) and write synchronous-looking code. It will automatically be converted into a non-blocking form internally (through the benefit of Tasks). When you are done with the socket (e.g. because it was told to shutdown) call close
on all sockets that you want to destroy from any task.