core-async

fabrao 2019-11-06T17:05:12.093100Z

Hello all, is there any way to stop pipeline-blocking process?

2019-11-06T17:06:14.093300Z

close the input

fabrao 2019-11-06T17:07:30.093900Z

but I use (to-chan <collection>), how to close this?

2019-11-06T17:08:29.094500Z

it is already closed, so pipeline-blocking will stop once it empties the channel

fabrao 2019-11-06T17:08:51.094900Z

but, if I want to force stop ?

2019-11-06T17:09:37.095700Z

you cannot

fabrao 2019-11-06T17:09:56.095900Z

😮

fabrao 2019-11-06T17:11:13.096400Z

so, I have to change the way to process it?

2019-11-06T17:20:25.096600Z

yes

2019-11-06T17:21:34.097400Z

all the ways to stop a thread from doing things non-cooperatively are deprecated on the jvm

2019-11-06T17:22:10.098100Z

so if you want to be able to stop some computation in the middle, you need to write it in such a way as to check in the middle to see if needs to stop

Jan K 2019-11-06T18:39:52.098800Z

I think you can close the channel returned from (to-chan coll) to end the process prematurely.

fabrao 2019-11-06T20:08:22.101200Z

@jkr.sw I'll try to use It in atom and close It externally