@@ -2688,6 +2688,10 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_uv_run, 0, 0, 1)
26882688 ZEND_ARG_INFO (0 , loop )
26892689ZEND_END_ARG_INFO ()
26902690
2691+ ZEND_BEGIN_ARG_INFO_EX (arginfo_uv_stop , 0 , 0 , 1 )
2692+ ZEND_ARG_INFO (0 , loop )
2693+ ZEND_END_ARG_INFO ()
2694+
26912695ZEND_BEGIN_ARG_INFO_EX (arginfo_uv_loop_delete , 0 , 0 , 1 )
26922696 ZEND_ARG_INFO (0 , loop )
26932697ZEND_END_ARG_INFO ()
@@ -3483,6 +3487,22 @@ PHP_FUNCTION(uv_run)
34833487}
34843488/* }}} */
34853489
3490+ /* {{{ proto void uv_stop([resource $uv_loop])
3491+ */
3492+ PHP_FUNCTION (uv_stop )
3493+ {
3494+ zval * zloop = NULL ;
3495+ uv_loop_t * loop ;
3496+
3497+ if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC ,
3498+ "|z" ,& zloop ) == FAILURE ) {
3499+ return ;
3500+ }
3501+ PHP_UV_FETCH_UV_DEFAULT_LOOP (loop , zloop );
3502+ uv_stop (loop );
3503+ }
3504+ /* }}} */
3505+
34863506/* {{{ proto long uv_run_once([resource $uv_loop])
34873507*/
34883508PHP_FUNCTION (uv_run_once )
@@ -6439,6 +6459,7 @@ static zend_function_entry uv_functions[] = {
64396459 PHP_FE (uv_unref , arginfo_uv_unref )
64406460 PHP_FE (uv_loop_new , NULL )
64416461 PHP_FE (uv_default_loop , NULL )
6462+ PHP_FE (uv_stop , arginfo_uv_stop )
64426463 PHP_FE (uv_run , arginfo_uv_run )
64436464 PHP_FE (uv_run_once , arginfo_uv_run_once )
64446465 PHP_FE (uv_ip4_addr , arginfo_uv_ip4_addr )
0 commit comments