Merge pull request #10072 from murgatroid99/node_uv_default

Switch Node back to using libuv iomgr by default
pull/10154/head
Michael Lumish 8 years ago committed by GitHub
commit be9f8ae8c1
  1. 8
      binding.gyp
  2. 4
      src/core/lib/iomgr/timer_uv.c
  3. 8
      templates/binding.gyp.template

@ -39,11 +39,9 @@
{ {
'variables': { 'variables': {
'runtime%': 'node', 'runtime%': 'node',
# UV integration in C core is disabled by default while bugs are ironed # UV integration in C core is enabled by default. It can be disabled
# out. It can be re-enabled for one build by setting the npm config # by setting this argument to anything else.
# variable grpc_uv to true, and it can be re-enabled permanently by 'grpc_uv%': 'true',
# setting it to true here.
'grpc_uv%': 'false',
# Some Node installations use the system installation of OpenSSL, and on # Some Node installations use the system installation of OpenSSL, and on
# some systems, the system OpenSSL still does not have ALPN support. This # some systems, the system OpenSSL still does not have ALPN support. This
# will let users recompile gRPC to work without ALPN. # will let users recompile gRPC to work without ALPN.

@ -78,6 +78,10 @@ void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer,
uv_timer->data = timer; uv_timer->data = timer;
timer->uv_timer = uv_timer; timer->uv_timer = uv_timer;
uv_timer_start(uv_timer, run_expired_timer, timeout, 0); uv_timer_start(uv_timer, run_expired_timer, timeout, 0);
/* We assume that gRPC timers are only used alongside other active gRPC
objects, and that there will therefore always be something else keeping
the uv loop alive whenever there is a timer */
uv_unref((uv_handle_t *)uv_timer);
} }
void grpc_timer_cancel(grpc_exec_ctx *exec_ctx, grpc_timer *timer) { void grpc_timer_cancel(grpc_exec_ctx *exec_ctx, grpc_timer *timer) {

@ -41,11 +41,9 @@
{ {
'variables': { 'variables': {
'runtime%': 'node', 'runtime%': 'node',
# UV integration in C core is disabled by default while bugs are ironed # UV integration in C core is enabled by default. It can be disabled
# out. It can be re-enabled for one build by setting the npm config # by setting this argument to anything else.
# variable grpc_uv to true, and it can be re-enabled permanently by 'grpc_uv%': 'true',
# setting it to true here.
'grpc_uv%': 'false',
# Some Node installations use the system installation of OpenSSL, and on # Some Node installations use the system installation of OpenSSL, and on
# some systems, the system OpenSSL still does not have ALPN support. This # some systems, the system OpenSSL still does not have ALPN support. This
# will let users recompile gRPC to work without ALPN. # will let users recompile gRPC to work without ALPN.

Loading…
Cancel
Save