But that means that you can only transfer one file at a time. So then instead I suggest using a SerializedSuspendableExecutionContext over some dispatcher and use scala.concurrent.blocking. This will serialize transfers but won't mandate a thread of its own.