aioftp icon indicating copy to clipboard operation
aioftp copied to clipboard

Multiplex download

Open Midnighter opened this issue 3 years ago • 2 comments
trafficstars

I was somehow expecting (mostly due to experience with async HTTP clients) to be able to use the same client instance to create multiple concurrent downloads. However, when I attempt this I get an error like

readuntil() called while another coroutine is already waiting for incoming data

Is this expected not to work or is there a problem with my code doing the downloading?

Would it work with multiple client instances or would they have to run in separate processes?

Midnighter avatar Sep 05 '22 09:09 Midnighter

FTP differs from HTTP very much. It has one long-playing command connection. So if you want multiple streams, then you need multiple clients. But I don't see any effort of this, since it is, anyway, will be network-bounded task.

pohmelie avatar Sep 05 '22 15:09 pohmelie

Okay, thanks! I have many small files to download so I don't think there is an issue with limited bandwidth on each file.

Midnighter avatar Sep 05 '22 15:09 Midnighter

@Midnighter perhaps this example will help you: https://stackoverflow.com/a/73871567

jmakov avatar May 07 '23 17:05 jmakov

Cheers, thank you for the hint. I should close this issue anyhow, since it's no longer a problem for me.

Midnighter avatar May 08 '23 12:05 Midnighter