Fork me on GitHub
#core-async
<
2019-11-06
>
fabrao17:11:12

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

hiredman17:11:14

close the input

fabrao17:11:30

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

hiredman17:11:29

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

fabrao17:11:51

but, if I want to force stop ?

fabrao17:11:13

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

hiredman17:11:34

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

hiredman17:11:10

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 K18:11:52

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

fabrao20:11:22

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