SodiumFRP / sodium

Sodium - Functional Reactive Programming (FRP) Library for multiple languages
http://sodium.nz/
Other
848 stars 138 forks source link

[c++] Sending inside a callback should throw #87

Closed notlion closed 8 years ago

notlion commented 8 years ago

I've run into situations in my own code where cycles are being created due to send() being called inside of listeners. The resulting infinite loop can be a bit hard to track down. The stack trace is really large and not super helpful. It would be great if this type of error was caught early by the library.

the-real-blackh commented 8 years ago

The Java version does this. I intend to make them all conform. What language are you using?

notlion commented 8 years ago

Sorry I hinted it in the title, but should have made it clearer. I'm using the C++ version.

the-real-blackh commented 8 years ago

Doh. OK - I'll fix it!

the-real-blackh commented 8 years ago

Fixed in https://github.com/SodiumFRP/sodium-cxx/commit/0c6e249e194724165e29f0163df12f66a074fccb