jdonaldson / promhx

A promise and functional reactive programming library for Haxe
MIT License
145 stars 24 forks source link

Unhandled Exception with Reject in CPP target #72

Closed aW4KeNiNG closed 8 years ago

aW4KeNiNG commented 8 years ago

Hi.

I have a problem with a code similar that #50 in CPP targets. The reject line is immediatelly executed in the EventLoop, so we have an unhandled exception. If you set the nextLoop property with a Timer.delay, then it is executed without problems.

Kind Regards.

jdonaldson commented 8 years ago

Check the section for Event Loop Management in the readme. CPP doesn't have a default event loop like js. You'll need to add one to provide equivalent behavior.

aW4KeNiNG commented 8 years ago

Yes, thanks. I told you that it works if i assign the nextLoop property with an equivalent behaviour. I didn't know that you want it like default behaviour. But it would be helpful to indicate in the Readme that other targets like CPP haven't a default Event Loop. It will avoid to check the code when the user search the problem.

I close the issue ;)

jdonaldson commented 8 years ago

Yep, I agree. I'll add a note.