diff --git a/src/nodepp/generator.h b/src/nodepp/generator.h index 4668fb2..4bdca39 100644 --- a/src/nodepp/generator.h +++ b/src/nodepp/generator.h @@ -74,14 +74,14 @@ namespace nodepp { namespace _promise_ { template< class T, class U, class V > coEmit( ptr_t state, const T& func, const U& res, const V& rej ){ gnStart - func( res, rej ); while( *state!=0 ) { coNext; } + func( res, rej ); while( *state==1 ) { coNext; } gnStop } template< class T, class U > coEmit( ptr_t state, const T& func, const U& res ){ gnStart - func( res ); while( *state!=0 ) { coNext; } + func( res ); while( *state==1 ) { coNext; } gnStop } @@ -346,4 +346,4 @@ namespace nodepp { namespace _poll_ { }} #undef NODEPP_GENERATOR -#endif \ No newline at end of file +#endif