Skip to content

Instantly share code, notes, and snippets.

@judfs
Last active October 11, 2024 18:22
Show Gist options
  • Save judfs/62febfd4a1f4b46fb4c59c948f5dd7ab to your computer and use it in GitHub Desktop.
Save judfs/62febfd4a1f4b46fb4c59c948f5dd7ab to your computer and use it in GitHub Desktop.
clone psudeo code
f = open(path, 'r')
dsts = [open(it, 'w') for it in dst_paths]
nbuf = 1024
while file_not_complete:
buffer = read_async(f, nbuf)
await all
for d in dsts:
d.write_async(buffer)
await all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment