purescript-contrib/purescript-aff-bus

Avoid delay before kill?

Opened this issue · 8 comments

Would be nice if we could avoid the delay before the kill

https://github.com/slamdata/purescript-aff-bus/blob/e57663b133864fc34ed29989f850c7b6a05c2052/test/Main.purs#L60-L63

Note there is a typo interpats should be interrupts

@natefaubion do you have any suggestions on how to fix this?
I tried to put invincible in some places but was not able to fix it

Are you suggesting that messages written before a kill should be readable even after a kill?

I was expecting that doing write, while there are computations blocked on read, will awake them and only after that kill would happen.

There is no guaranteed interleaving of effects for Fibers running in parallel. In the given test, the readers may not yet be blocked on read when the kill occurs.

Yeah, I guess this can be closed than

If this is something you need then I want to know. I am trying to patch or replace this library so I can get a patch to Aff officiated.

I'm using the Bus. this issue tho was open to remove that delay from tests (which is referenced in description) I have no this issue in real life.

@eric-corumdigital @erisco I have fixed this issue here #17 would love your input on that. /cc @natefaubion @garyb