core-async

frankitox 2022-08-31T15:53:11.859889Z

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

souenzzo 2022-09-01T12:37:12.393719Z

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

frankitox 2022-09-01T13:14:33.688789Z

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

frankitox 2022-08-31T15:53:45.544869Z

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

2022-08-31T15:54:20.075139Z

Don't do io in go blocks

isak 2022-08-31T15:58:24.983389Z

How about via thread? https://clojure.github.io/core.async/#clojure.core.async/thread

2022-08-31T15:58:56.032259Z

Yes, that is the purpose of thread

isak 2022-08-31T15:59:23.420049Z

@franquito ^

frankitox 2022-08-31T16:15:13.630399Z

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

👍🏻 1
2022-08-31T15:53:36.292529Z

No