►
From YouTube: Node.js N-API Team meeting - Nov 25 2019
Description
A
A
Okay,
let's
then
dive
into
the
meeting
I'm
going
to
share
lost
on
11,
so
the
first
one
on
the
agenda
is:
do
we
need
some
additional
async
worker
variance?
We
did
talk
about
this
and
there's
a
PR
open
for
the
async
progress
queue
worker,
which
I
think
is
the
the
only
other
one
we
think
is
left
I
can
see
that
sort
of
working
through
the
process
so
is.
A
B
A
C
C
There
should
be
a
status
table,
but
there's
yeah
and
there's
a
link
there
for
context
awareness.
So
these
were.
These
are
the
two
topics
that
I
could
find
that
we're
related
to
context.
Awareness
I
want
to
make
sure
they
apply
and
I
want
to
make
sure
I've
covered
everything
that
we
want
to
cover
under
context
awareness.
E
D
It
was,
it
was
strictly
monotonic,
they
show
up
and
they
never
leave,
but
now
it
is
actually
possible
for
them
to
leave
if,
if,
if
an
add-on
is
not
added
to
to
the
main
thread
right,
so
if
it
only
appears
on
secondary
threads
and
you
close
all
the
secondary
threads,
then
the
add-on
is
actually
physically
unmapped
from
the
process.
Okay,
so
that's
separate
from
cleanup
hooks
because.
A
A
D
So
that's
that's
because
because
then,
because
then
you
know
basically
I
think
the
progression
here
is
that
what
I
can't
use
static
variables,
where
am
I
gonna
put
my
stuff
right
and
and
then
and
then
we
tell
them
okay.
Well,
you
have
you,
have
you
can
pass
data
to
to
the
functions
data
which
you
can
then
remove
using
clean
up
hooks
right
because
they
each
the
each
function
accepts
a
void
star
right
and
then
you
can
attach
that
data
either
to
the
function.
D
You
can
attach
it
to
the
exports
or
you
can
attach
into
the
environment
using
a
clean
up
hook
or
if
you,
if
you
do
not
wish
to
support
nappy
10,
then
you
can
use
the
instance
data
and
then
and
then
you
know
you
have
an
instance
data
which
you
can
retrieve
from
the
environment.
And
then
that
is
your
global
static
data.
You
can
use
nappy
get
instance
that
unhappy
set
instance,
data
yeah,
so
so.
D
A
D
E
D
Off
the
table,
when
we
have
that,
then
I
was
actually
thinking
about
adding
like
I,
can
hand
it
on
glass
to
know
that
on
API,
which
which
basically
means
like
you
know,
you're
you're
you're
in
it
for
your
atom
will
consist
of.
Like
you
know
my
add-on,
:
:,
you
return
my
head
on
:
:
you
and
then
that
will
return
either
the
exports
that
was
passed
in
or
a
completely
new
object,
just
as
it
does
now,
but
it
will.
D
D
D
Even
using
like
pointers
to
static
data
is
not
safe,
because
if
the
if
the
add-on
gets
unloaded
and
some
of
its
JavaScript
objects
are
still
in
scope,
then
if
they
contain
pointers
by
way
of
nappy,
wrap
static
items,
then
those
those
pointers
will
be
invalid.
Yeah
because
the
library
gets
unloaded
right.
Okay,.
C
A
D
E
D
A
A
A
D
A
So
I
think,
but
it
was
kind
of
like
it's
it's
it's
probably
worth
explaining
it
in
terms
of
like
don't
use
native
data
and
that
you
know
even
like
it
may
be,
the
the
module
itself
may
or
may
not
be
unloaded
on
you,
but
that
even
if
that
didn't
happen,
it
wouldn't
matter
because
you
know
you'd
be
colliding
across
multiple
threads.
Exactly
yes,
yes,
so
yeah.
A
A
D
This
describe
that
in
here
as
well
right,
so,
okay,
so,
okay,
so
then
the
three
mechanisms,
the
latest
and
greatest
quote-unquote
isn't,
is
the
instance
data.
A
slightly
earlier
version
is
cleanup
hooks
and
then
and
then
available
since
snappy
1.0
is,
is
well
actually
I.
Shouldn't
say
that
not
since
1.0,
but
since
for
I
think
we're.
D
D
D
D
Basically,
basically,
you
you
you
heap,
allocate
you
heap
allocated
from
in
it
at
a
clean
up
hook
to
make
sure
whatever
you
he
Bella
gated
gets
freed,
and
let
you
past
that
pointer
around
to
your
functions
to
your
async
workers,
to
to
your
thread.
Safe
functions,
do
everywhere.
Right,
basically,
becomes
your
global
static
data
at
that
pointer
that
that
you've
allocated
in
right
in
in
your
init
function,
and
you
need.
E
D
C
D
So
async
context
is,
is,
is
basically
it's
just
sort
of
a
sort
of
like
it's
metadata
for
for
for
the
async
hooks,
it
basically
says
says
that
I'm
doing
something.
Async
I
can't
tell
you
what
it
is,
what
it's
async,
and
so
you
know
you
you,
you
do
your
bookkeeping,
knowing
that
this
is
an
async
thing,
it
could
be
a
thread,
it
could
be
a
file
descriptor,
it
could
be
whatever.
But
the
point
is
that
this
is.
This
is
merely
the
metadata
for
for
for
dealing
with
with
an
async
process.
B
Think
contacts
is
not
a
in
uncopyable,
so
if
it's
intended
to
be
used
in
basic
operations,
so
if
it's
not
copy
of
how
to
read
an
order
to
the
just
pass
it
around,
and
so
we
can
use
it
later,
I,
don't.
D
A
A
D
C
H
G
A
E
A
E
E
Some
of
our
so
meters
expositor
on
exposed
by
our
API,
but
the
question
is
that
there
are
many
methods,
the
heat
and
think
view
could
be
routed
only
on
cheapest
+17
and
we
need
to
check
if
yeah,
what
version
of
civic
class
is
is
currently
use
it
and
an
a
both
these.
These
methods,
these
new
methods.
So
he
won't
a
want
to
know
what
to
do
eating
yeah,
yeah.
D
The
this
the
in
line
would
be
okay,
but
but
the
header
would
not
be
right,
because
we
have
lots
of
places
where
we
have
standard
strings
and
then,
if,
if,
if
he
wants,
if
he
wants
like
an
additional
variant
with
strength,
you
right
and
and
the
nappy
dot
H
is
gonna
look
fairly
bad
because
it's
gonna
have
lots
of.
If
thefts
right,
but
at
least
we
can,
we
can
do
the
implementation
in
like,
like
I,
don't
know
like
nappy
nappy
in
old
dot,
CPP
17
dot
H,
you
know.
So
we
could.
D
D
Yeah
we
can't
have
a
separate
include
file
like
a
separate
header
file.
You
know
with
like
the
public
header
file.
We
can't
have
that
a
separate
one
that
kid
that
only
gets
included
if
you
have
C++
17
right,
because
we're
sort
of
we're
sort
of
poking
into
individual
classes
and
adding
method
to
the
class
or
not
adding
the
method
to
the
class,
depending
on
whether
it's
C++
17
or
not.
D
So
so
it's
a
little
hard
that,
but
but
on
the
implementation
side
in
the
in
the
nappy
in
all,
we
could
do
that
like
we
could
do
that.
The
same
way
we
do
the
deprecated
right.
We
could
just
add
another
file
called
C++
17
so
that
that
would
be
okay,
but
the
main
header
file
would
still
get
cluttered
a
little
bit
with
all
these
different
variants.
It's
already
pretty
cluttered
because
we've
we
provide
lots
of
convenience
variants,
but
I
I'm.
D
A
D
A
So
because
it
says
now,
it's
of
course
possible
to
create
new
method
overload
single
and
it
currently
takes
a
constant
string.
Yeah,
though
that's
quite
a
few
locations,
also
going
for
two
to
three
string
like
types
would
mean
an
explosion.
The
number
of
method,
definitions,
I'll,
take
two
string
like
part,
so
it
I
think
he
was
suggesting
something
else.
D
A
A
A
Just
I'm
just
wondering
if
we
should
have
something
that
makes
it
like
opt
in,
so
that
you
don't
autumn
it
you
don't.
You
know
you
don't
accidentally
start
to
use
things
that
well
yeah.
Okay,
you
start
to
use
these
because
it
works
on
your
compiler.
But
then
you
don't
realize
that
like
well
wait
a
sec
most
most
people.
Don't
don't
you
know
because
we've
we've
tried
to
keep
ours
are
well
and
we
test
as
well
like
we
test
with
compilers,
which
you
know,
the
node
versions
are
built
with.
E
D
D
Well,
wait
a
minute,
though,
like
if
you
but
like
if,
if
if
it
works
for
you
right
like
if
we're
guarding,
if
we're
guarding
with
with
with
the
CPP
flag
right
the
CPP
version
flag,
then
and
it'll
but
I'll
I,
guess
I,
guess
the
only
see
only
change
there
is
well.
Basically
we
don't
want
to
say
you
know
if
this
flag
is
on
and
then
build
with
CPP,
17
or
otherwise,
don't
know.
D
A
A
A
That
would
work
with
any
compiler,
while
any
you
know
any
compiler
above
the
one,
the
minimums
that
we
used
to
build
node
in
the
first
place.
Yeah,
then,
if
you
turn
this
on,
it
would
give
you
it
would
actually
change
the
signature
and
our
understanding
that
signature
would
end
up
being
you
know,
you
could
now
use
a
string
view
or
what
was
there
originally
so.
D
So,
basically,
basically,
what
we
will
have
is
we
will
have.
Where
is
that?
Where
is
that
preprocessor
valued?
That
is
present
in
C++
seven,
that
like
so
so,
we
would
have
hash
if
version
greater
than
whatever
2017
whatever
right.
I
forget
what
the
directive
is.
Oh
here,
it
is
like
hash,
if
underscore
underscore,
C++
greater
equal,
2017,
zero,
three
L
and
defines
Nappi
allow
C
17.
That
would
be
our
preprocessor
directive
for
for
using
the
using
the
updated
signatures
right
right.
So
if
either.
D
D
D
A
F
D
E
E
D
E
Very
fast
because
it's
a
it's
a
don't
know
in
terms
of
complexity,
yeah,
it's
not
linear
on
the
demand,
show
all
over
the
mansion
of
the
string
yeah
length
of
the
string.
So
it's
it's
an
optimization,
but
yesterday
I
was
thinking
to
this
and
I
it's
okay
for
me,
but
maybe
there
are
other
things
that
we
can
optimize
using
C++
70,
and
maybe
this
work
could
be
a
part
of
a
big
task
and
maybe
I
don't
know
in
the
future.
D
E
D
E
E
I
F
F
E
E
I
F
F
E
A
Sorry,
okay,
so
that's
good
any
other
issues.
We
should
talk
about
I.
E
D
Wait
is
this:
is
this
the
issue?
There's
this
person
also
submitted
up
PR?
Yes,
there,
oh
yeah
it
six.
Six.
Oh
four
is
the
PR
six
or
thrice
the
issue
yeah.
This
is
this
is
really
cool.
It's
it
basically
lets
us
avoid
allocating
stuff
in
order
to
to
create
these
our
function
callbacks.
So
this
person
sent
a
PR
against
against
object,
wrap
that
introduces.
D
Instance
and
static
methods
which
do
not
need
to
heap
allocates
their
callback
data
because
the
function
pointer
is
passed
as
a
template
parameter
and
so
that
doesn't
need
to
be
stored
on
the
heap
and
the
the
instance,
which
is
the,
which
is
the
native
context,
for
the
method,
call
can
be
retrieved
using
using
unwrap
and
so
so
the.
So.
You
need
to
allocate
nothing
basically
in
order
to
create
these
functions.
D
Yes,
where,
where
where
where
instead
of
passing
the
function
as
a
parameter,
you
pass
it
as
a
template,
parameter
and
then,
and
then,
because
of
that
you
can
avoid
you
can
avoid
allocating
these
structures
that
we
use
for
translating
the
the
Nappy
function.
Signature,
the
core
and
API
functions,
signature
into
the
node
on
API
function,
signature,
so
you
can
create.
D
You
can
create
the
callback
info
on
the
stack
which
we've
already
doing,
but
you
can
call
the
function
without
having
to
retrieve
anything
from
the
callback
data
because
the
function
is
being
passed
as
a
template
parameter.
So
it's
all
static,
right
and
and
done
at
compile
time.
So
the
resolution
is
done
at
compile
time
rather
than
at
run
time,
which
is
there.
A
D
D
No
very
unlikely
yeah,
no
I
I,
don't
think
so,
because
the
the
the
method,
like
the
callback
that
that
you
add,
like
the
the
Nappy
core
callback
that
you
give
is,
is
being
sort
of
like
it's,
it's
being
instantiated
on
the
spot
and
so
I
mean
statically,
mind
you,
but
on
the
spot,
like
you
know,
it's
like
a
you
know
when
you,
when
you,
when
you
make
a
call
to
a
templated
function,
it
actually
creates
the
function
in
the
same
compilation
unit.
So
so
that
kind
of
thing.
D
D
A
D
Yeah
I
mean
it
will
like
if
you,
if
you
write
your
code
right
and
you
say,
like
instance,
method
brackets,
something
something.
Then
it
will
use
the
old
one.
It'll
write,
so
sorry
I
mean
they're.
The
compiler
will
resolve
this
for
you
and
then
there
is
no
doubt
that
you're
using
the
old
one,
because
if
you
are
using
the
new
deal,
the
new
one,
you
cannot
say
instance,
method
bracket.
You
have
to
say
instance,
message
tag
and.
D
D
A
D
A
D
Exactly
yeah
great,
so
yeah
you'd
have
to
opt
in
to
the
new
ones
and
and
that
we
didn't
really
don't
want
that.
No
I
think
right,
like
we
want
to
make
the
new
ones
available,
but
but
in
terms
of
deprecation
yeah
that
that's
one
of
the
implications
like
the
old
ones
should
be.
Deprecated
should
be
phased
out
eventually.
So
so.
D
C
E
D
E
D
D
D
D
Right,
but
my
concern
is
that
currently,
the
meaning
of
nappy
disable
deprecated
is
only
to
remove
the
the
leaky
property
descriptor
signatures
and
the
leaky
function
signatures
that
that
is
the
meaning
of
nappy
disable
deprecated.
Today,
if
we,
if
we
expand
that
to
include
the
removal
of
the
non
templated
class
definitions,
then
then
those
folks
that
use
the
non
templated
class
or
class
methods
definitions
will
all
of
a
sudden
find
themselves
having
to
change
their
code
right,
whereas.
D
E
A
A
D
A
D
A
D
D
D
Good
with
yet
November
2019
is
good
or
just
two
three
four.
That
kind
of
thing
is
good
too,
so
we
have
like
we
have
we
haven't.
Currently
we
have
nappy
disable
deprecated
right.
So
if
we
have
nappy
disable
deprecated
to
or
underscore
to
that's
fine
to
use,
okay,
maybe
we
should
use
0-2.
You
know
just
in
case
somebody
does
a
pie,
grep
and
sort
or
something
you
know
right.
E
D
A
D
D
D
A
D
D
B
So
the
not
be
disabled
deprecated,
you
know,
should
not
be
recommended
for
the
be
recommended
for
choosing
a
like,
not
not
a
CI
environment,
yeah.
E
D
D
D
D
C
E
A
Right
so
do
we
want
to?
We
got
several
choices
we
can
skip.
We
can
okay
I'm
still
trying
to
get
it.
We
can
try
and
move
it
like
up
or
down
an
hour.
What
would
we
prefer?
Actually
I?
Don't
see
the
security
one
on
the
calendar
I'm
still
in
the
wrong
day.
That's
why
sorry?
Okay,
yes
you're
right!
So
we
can.
We
can
try
and
move
it
some
other
time
or
skip
which
two
people
think
works.
Best
I'd.