core-async

joshuamz 2025-06-01T19:43:53.594339Z

Hi. I've just tested core.async.flow and I quite like it. I've read the guide and reference pages, watched Alex' youtube walkthrough and played around with the example repo. However, I haven't found a way to run a specific Flow process in parallel. Is there a way for a proc to compute as many incoming channel values as possible? In my use case, I need to maximize CPU utilization by shelling out to an external (CPU intensive) CLI tool for each input value and I thought I could control that by providing different input channel sizes for this particular proc. A quick disclaimer, I don't have much prior experience with core.async and I'm still wrapping my head around workload types and underlying executors.

2025-06-01T19:48:48.874539Z

Parallel processing is not going to be "in" the flow, but some external thing that the flow feeds values into, and may consume values from

2025-06-01T19:49:55.123309Z

So a process that feeds values into an executor or something, and then those tasks send values back into the flow via an in-ports channel or something

joshuamz 2025-06-01T19:50:14.273549Z

We've already built a system that parallelizes jobs based on input values with traditional fixed-size thread pools via Claypoole. However, I feel many parts of the system can be simplified considerably with the Flow (CSP) approach.

joshuamz 2025-06-01T19:50:43.061599Z

I see. Then there should be a mix of flow with an external values producer, which should be running in parallel

2025-06-01T19:51:37.009499Z

That method is entirely workable with the standard process stuff in flow

2025-06-01T19:51:58.743299Z

If you are willing to implement your own ProcLauncher you can do whatever

joshuamz 2025-06-01T19:58:46.912679Z

Got it. Then the standard process flow is always sequential. Yes, I'd look into ProcLauncher next, I just wanted to make sure I understand what is already available in the standard model. Thanks!

Joe Lane 2025-06-01T20:08:46.623369Z

https://clojurians.slack.com/archives/C05423W6H/p1746639626781339

👀 1
🙏 1