Monday, 3 April 2017

How to timeout a yield statement in KoaJs/NodeJs?

I have a statement which gives its result through yield but in some cases it somehow doesn't work and my yields keep waiting infinitely and the only solutionI'm left with is to restart the application. I want to know if there is any way I can set timeout while getting result through yield in KoaJs

var x = yield someFunction(par1)
return (x)

my problem is that in few rare cases someFunction does not return any value, and I get stuck in a hell of eternal waiting



via Point Networks

No comments:

Post a Comment