Skip to content

Commit 361b728

Browse files
author
Stephen Belanger
committed
diagnostics_channel: built-in channels should remain experimental
1 parent 916af4e commit 361b728

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

doc/api/diagnostics_channel.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,12 @@ channel.unsubscribe(onMessage);
409409

410410
### Built-in Channels
411411

412+
> Stability: 1 - Experimental
413+
414+
While the diagnostics_channel API is now considered stable, the built-in
415+
channels currently available are not. Each channel must be declared stable
416+
independently.
417+
412418
#### HTTP
413419

414420
`http.client.request.start`

src/node_contextify.cc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,6 +1407,17 @@ void Initialize(Local<Object> target,
14071407

14081408
READONLY_PROPERTY(constants, "measureMemory", measure_memory);
14091409

1410+
Local<Object> loop_mode = Object::New(env->isolate());
1411+
{
1412+
uv_run_mode DEFAULT = UV_RUN_DEFAULT;
1413+
uv_run_mode ONCE = UV_RUN_ONCE;
1414+
uv_run_mode NOWAIT = UV_RUN_NOWAIT;
1415+
NODE_DEFINE_CONSTANT(loop_mode, DEFAULT);
1416+
NODE_DEFINE_CONSTANT(loop_mode, ONCE);
1417+
NODE_DEFINE_CONSTANT(loop_mode, NOWAIT);
1418+
READONLY_PROPERTY(constants, "loopMode", loop_mode);
1419+
}
1420+
14101421
target->Set(context, env->constants_string(), constants).Check();
14111422

14121423
SetMethod(context, target, "measureMemory", MeasureMemory);

0 commit comments

Comments
 (0)