funcool

niwinz 2023-02-06T09:56:49.750369Z

my main idea is adding the ability to close channel with an error and an additional option or specific exception handler that leaves the user the option to close the channel with an error when the error is happening on the provided transducer. This also will make blocking take operations throw the exception and nonblocking returning rejected promise

mccraigmccraig 2023-02-06T21:04:43.007779Z

that's the direction i was thinking in too

mccraigmccraig 2023-02-06T12:47:36.440449Z

hmm - i have an issue with CSP stream transducers - looks like the finaliser arity is not getting called, which is causing some data to sometimes go missing with stateful transducers ... will investigate further

mccraigmccraig 2023-02-06T13:28:49.231629Z

my test passes if i remove the (zero? (mlist/size @puts)) clause so that (add-fn buf) (which is the finaliser arity of any transducer) is always called on close! when there is a buffer ... https://github.com/funcool/promesa/blob/master/src/promesa/exec/csp/channel.cljc#L333 what does that clause guard against ? i'm not yet sure of the consequences of removing it or changing it...

niwinz 2023-02-06T16:10:02.275639Z

that looks like legacy, when I have initially look on how core.async worked, because of the other topic we have talked previously: core.async does not clears the put queue. So this looks like a bug, and this condition should be removed

niwinz 2023-02-06T16:10:40.728389Z

i guess this when is responsible of your bug

niwinz 2023-02-06T16:11:19.785239Z

i'm right now a bit busy, but as soon as I return to promesa code I will fix it.

niwinz 2023-02-06T16:14:49.848879Z

That when probably should be replaced with:

(some-> buf add-fn)

👍 1
mccraigmccraig 2023-02-06T16:18:08.466379Z

yep - bug goes away when that bad clause is removed

niwinz 2023-02-06T16:23:00.009379Z

thanks for confirming, I will remove it as soon as I return to promesa codebase

mccraigmccraig 2023-02-06T16:23:48.739719Z

cool - dyu want me to do a PR ?

niwinz 2023-02-06T16:24:07.190319Z

if you have time for it, i'm glad to accept it

👍 1
mccraigmccraig 2023-02-06T18:30:11.699599Z

here u go - clj CI is broken, but it's broken on trunk too https://github.com/funcool/promesa/pull/135

niwinz 2023-02-06T18:31:10.089999Z

yep, I know it is broken, don't worry i will fix that on my next promesa iteration 😛

👍 1