Fork me on GitHub
#core-async
<
2022-08-31
>
frankitox15:08:11

It makes sense to do IO (eg: file upload) inside a go block? I'm thinking of uploading X files using one go block per file

frankitox15:08:45

I'm asking because the docstring says > go blocks should not (either directly or indirectly) perform operations that may block indefinitely.

hiredman15:08:20

Don't do io in go blocks

hiredman15:08:56

Yes, that is the purpose of thread

frankitox16:08:13

I see, thank you @U08JKUHA9! looks like thread is what I need!

1
souenzzo12:09:12

you will probably end up using a pipeline-blocking, to avoid the creation of 1e3 threads to upload 1e3 files.

frankitox13:09:33

ahhh thanks, I was implicitly implementing (a very crappy version of) that function!