Fork me on GitHub

does core.async and binding play well in clojurescript? it looks like using binding inside go block, doesn't restore previous bindings for me:


@darwin: the issue there is go - just keep in mind that go is a macro that does crazy stuff in order to work. Because of that, you only want code inside a go/go-loop block that absolutely has to be there. I'm not surprised that something like binding doesn't work properly inside a go block.


I'm not claiming to understand exactly what go does, I just know that it rewrites your code dramatically and keeping go block as simple as possible avoids a lot of pain.


@meow: I’m also not surprised, what worries me is that all re-frame handlers are running inside go loop, which is pretty large code surface, I will have to think twice when using binding from now on


wait, I will do another test, with binding inside function call, not immediately in go body


right - give that a try


the go macro has no depth - it isn't going to rewrite the content of some called function


so it should not matter what code you have in those called functions - hence re-frame is safe because all it is doing is dispatching to handlers


confirmed, in function called directly from go body it works as expected


I feel much safer now simple_smile