core-async 2026-02-04

Is there a way to wait for a flow to completely shut down? It doesn't seem like flow/stop waits for all procs to stop before returning. For context, I have some resources I want to free after a flow is stopped and I want to ensure that these resources are freed last, after all processes have stopped.

Alex Miller (Clojure team) 2026-02-04T19:32:43.970469Z

what kind of resources?

This is for clj-media. This particular example is freeing native memory.

If I free too early, I can get a segfault if some code tries to reference the freed memory. I can let the gc track the handles, but I haven't found a good way to make sure that the gc cleans up resources in a reasonable amount of time which leads to lots of memory bloat on the native heap.

Right now, I have pools of packets/frames that get passed around and reused. At the end, I'd like to free all the packets/frames.

Alex Miller (Clojure team) 2026-02-04T19:43:46.156789Z

can you ping?

I thought you couldn't ping after a flow has stopped.

I guess I could pause, ping, then stop.

Pinging a stopped flow throws an exception.