►
From YouTube: Node.js N-API Team meeting 2019-09-23
Description
A
A
C
A
A
A
B
B
A
C
A
Just
out
of
curiosity
this,
this
this
example
will
show
you
how
to
build
using
C
makes.
So
there
is
no,
there
is
no
binding
chip
or
anything
right
now
in
terms
of
in
terms
of
making
an
NPM
package.
Does
it
cover
that,
like
you
know,
because
you
have
like
NPM,
publish
and
an
NPM
pack
and
those
things?
How
does
it
relate
to
those.
B
A
B
A
A
B
A
A
Topic:
okay,
oh
I,
see,
okay,
all
right,
I
guess:
I'll
have
a
look
at
it
as
well,
and
anybody
else
who
would
like
to
sure
all
right.
So
then,
let's
see
next
one,
what
should
go
into
an
API
five,
so
I've
updated
the
list
there
a
little
bit
basically
node
version.
Eight
is
off
the
table
and
API
five
will
not
be
node
version
eight
because
there
won't
be
any
more
minor
versions
released.
So
it
remains
as
it
is
version.
A
10,
I,
believe
all
the
major
things
have
landed
so
so,
like
the
actual
and
API
work
with
the
finalizer,
the
data
object
and
the
optional
static
function.
Callback
they
have
landed
so
now
only
the
only
then
the
meta
stuff
has
to
land
the
PR
which
marks
these
things
as
stable
has
to
land
and
then
the
PR
that
updates
the
matrix
to
to
show
the
first
version
of
of
ten
in
which
an
API
five
is
available
that
has
to
on
version
12.
Everything
is
good.
A
This
still
needs
to
land.
I
haven't
checked,
I
shouldn't
need
to
create
the
backboard
PR
for
this,
because
it's
a
clean,
it's
a
clean,
cherry-pick
from
masters
at
least
it
was
when
I
last
checked
so
I'll
keep
checking
and
if
it
needs
a
back
for
its
Outback
port,
but
this
should
be
good,
so
yeah
we
should
be.
We
should
be
there
with
an
API
5
pretty
soon,
hopefully,
depending
on
the
release
team.
So,
ok,
let's
see.
C
B
A
C
A
A
A
A
All
right
so
in
terms
of
this
issue,
nothing
on
my
part
at
least
nothing
directly
to
report
other
than
I
sort
of
compiled
a
list
of
an
API
modules
again,
just
because
I
was
working
on
a
little
bit
on
the
on
that
PR.
That
seeks
to
turn
all
the
outstanding
reference
callbacks
into
into
environment.
Cleanup
hooks
I
was
able
to
come
up
with
a
really
simple
way
of
doing
it.
A
So
basically
just
take
all
the
references
and
stick
them
in
a
linked
list,
and
then
you
know
when,
when
the
nappy
an
forgets
destroyed,
just
walked
the
list
and
just
called
them
all.
So
it's
it's
very,
very
cheap
to
do
that
and
it
works
really
well
and
but
of
course,
Anna
wanted
me
to
test
thoroughly
as
if
it
were
a
city
run,
and
so
what
I
did?
Where?
Is
that
comment?
Oh
this
one.
So
so
then,
basically
I
just
went
through
all
the
all.
A
The
packages
in
Syd,
gym
and
and
some
of
the
reverse
dependencies
have
no
dad
on
API
and
basically
I
took
the
ones
with
which
had
really
really
lots
of
of
downloads
and
just
made
sure
that
it
works
against
the
PR.
So
the
side
effect
of
that
is
now.
We
now
have
a
nice
dense
list
of
all
the
most
popular
and
API
packages,
and
it
worked
well.
A
The
only
one
that
had
some
issues
was
level
down
and-
and
this
is
actually
one
of
those
things
where
I'm
not
sure
we'd
have
to
discuss
how
how
much
of
a
how
much
of
an
impact.
This
is
right,
so,
basically
with
the
change
or
without
the
change
level
down,
if
you
run
it
in
a
worker
thread
or
if
you
run
it
in
in
in
like
electron,
then
or
if
you
run
it
in
a
certain
way,
an
electron
like
if
you
run
it
in
multiple
copies
one
after.
A
It
would
exit
successfully
right,
whereas
with
this
change
it
would,
it
would
cause
it
would
cause
an
assertion
to
fail
and
therefore
the
process
would
abort,
because
one
of
the
destructors
which
which
happens,
which
gets
called
during
during
well
during
normal
course
of
operations
as
well,
but
but
which
gets
called
out
of
sequence
during
teardown,
has
an
assertion
written
into
it.
That
says,
you
know
if,
if
the
query
is
still
open,
then
then
fail
like
just
abort
the
process,
because
the
query
is
supposed
to
be
closed
before
you
delete
the
query
handle
so
so.
A
I
documented
this
here
and
we'll
see
we'll
see
what
what
people
think
about
that,
whether
that's
that's
a
big
enough
change
to
be
considered
breaking
or
whether
we
can
deal
with
that,
because
it
only
happens
if
people
don't
close
their
databases
properly
right.
So
it's
already
sort
of
an
error
condition.
This
just
turned
this
just
makes
it
from
from
a
silent
sort
of
leaky
situation
into
a
full-on
abort.
A
A
Where
is
it
right
here,
like
0,
0,
mq
I,
think
we
we
sort
of
looked
at
that
and
the
back
some
LJ
has
those
those
are
two
that
could
use
some
porting
and,
of
course,
notes
ass.
That's
that's!
That
seems
like
a
big
one,
but
all
in
good
time,
I
guess
so.
So
that's
what
I
have
on
there
I
don't
know.
Has
anybody
worked
on
any
other
modules
which
which
should
be
mentioned
here?
A
C
C
C
A
C
C
B
C
A
C
A
A
A
C
A
I
know,
for
example,
with
with
Jerry
script.
What
I
did
at
some
point
was
I
had
I
had
to
I,
had
to
basically
sort
of
prefix
the
the
whole
test
with
things
that
would
define
like
console,
dot,
log
and
stuff
like
that,
because
and
process
and
that
kinds
of
things,
because
the
the
tests
themselves
they
concentrate
on
language
features
right
but
easy,
but
we
do
use
nodejs
infrastructure
like
require
dot,
slash
common.
A
You
know
that
doesn't
exist
in
it
that
didn't
exist
in
Jerry
script
right,
so
so
so,
basically
the
way
I
did
it
in
Jerry
script
is
I,
said:
okay,
so
run
this
little
chunk
of
JavaScript,
which
basically
sets
up
all
the
node.js
stuff.
Like
really
really
rudimentary
basic
nodejs
interfaces
then
run
the
test
unchanged.
You
know,
and
and
and
using
the
the
implementation
that
I'd
written
so
yeah.
It's
very
important
that
the
tests
remain
unchanged.
Otherwise,
you're
not
testing
an
API
you're
testing,
whatever
right
and
as
you're
developing
it.
The
way
I
did.
A
It
was
I
basically
commented
out
the
entire
test
and
then
and
then
I
commented
I
commented
back
in
or
rather
I.
Let
I
let
a
little
bit
of
JavaScript
back
in
and
made
sure
that
works
and
then
I
I,
let
a
little
bit
of
JavaScript
back
in
and
I
made
sure
that
works
and
so
forth
until
until
I
was
able
to
leave
the
whole
test
in
place
unchanged.
A
A
A
A
M'c
eliminated
an
api
as
as
the
cause
for
it.
In
fact,
I
just
offline
for
to
satisfy
my
own
curiosity,
I
I
wrote
a
v8
add-on
that
would
basically
just
create
functions
like
crazy
and
and
yes,
it
exhibited
the
same
problem.
So
definitely
an
API
not
involved
in
that
yeah.
We're
gonna
have
to
figure
that
one
out
in
v8
and.
C
A
A
Let's
see
yeah
okay,
so
this
one
is
reviewing
but
I,
see
I
will
push
fix,
changes
later
and
fix
changes
were
pushed
okay.
So
alright,
this
is
kind
of
a
to-do
item.
Then,
to
have
a
look
at
this,
it
should
be
pretty
straightforward
and
I.
Don't
think
it's
controversial
because
pretty
much
every
engine
has
this.
So
just
he's
looking
at.
A
A
So
then
what
else
do
we
have?
Yes,
this
is
an
old
request
and
I
think
this
one
is
this.
One
is
gone,
need
to
have
a
look
at
that
over
the
course
of
the
week,
but
I
don't
know,
I.
Think
I
think
these
are
pretty
much
the
big
ones
right,
I,
don't
think
I've
missed
one.
So,
let's
see,
let's
see
the
other
repo.
Oh,
that
would
be
the
next
issue
so
that
this
is
the
core,
and
then
we
have
this
one.
C
A
A
C
A
Yep,
that's
what
it
looks
like:
okay
yeah.
It
would
be
bad
too.
I
think
it
would
be
bad
to
roll
this
back
entirely.
I
think
we
just
need
to
put
the
experimental
back,
because
the
everything
else
here
is:
okay,
just
the
removal
of
the
experimental
I
think
is
the
issue,
so
that
would
be
something
to
PR.
D
So
the
only
way
that
I
was
able
to
solve
it.
If
you
scroll
down
just
a
little
more,
is
by
explicitly
having
an
STD
function
like
so
all
right,
because
otherwise
they're
both
pointers
right,
correct,
yeah,
they're,
both
point,
oh
yeah
and
I,
don't
know
how
we
should
go
about
solving
this
and
then
also
the
optional
function.
Call
back.
It
seems
like
there's
a
lot
going
on
with
new
now
yeah.
E
A
C
A
Starting
to
get
to
that
point,
I
suspect,
with
this
new
degree
of
freedom
that
we
added
with
with
the
optional
callback
that
just
sort
of
pushes
it
past
the
point
that
you
can
just
cover
every
conceivable
scenario.
So
I
don't
know,
is
I,
guess,
I,
guess
all
the
all
the
factory
functions
day.
They
end
up
calling
the
constructor
in
different
ways
right
so
wouldn't
would
it
be
possible
to
just
add
a
constructor
that
leaves
nothing
out
and
and
just
doesn't
have
any
optional
values
for
anything
we
would
we.
A
D
D
So
if
you
scroll
to
the
top
he
in
this
suggestion
or
in
the
issue,
he
made
a
suggestion
of
the
very
top
like
that,
where
you
need
to
pass
an
empty
function.
You
know
it
has
no
environment
and
no
no
value
and
therefore
going
to
the
underlying
nappy,
create
thread
safe
function
as
an
old
call
back
yeah.
E
D
A
D
B
A
D
C
D
C
D
D
A
pointer
so
then
I
was
in
this
implementation.
I
have
the
add-on,
API
thread-safe
function.
It
just
has
a
concrete
instance
of
a
nappy
thread-safe
function
and
that
way,
when
you're
constructing
a
new
one
or
you're
copying
we
just
copy
over
that
the
underlying
nappy
thread-safe
function,
which
should
be
fine
if
it's
just
behaving
as
a
pointer,
correct,
yes,
yeah,
oh.
A
Absolutely
absolutely
so
so
so
so
the
so
the
core
nappy
threats,
a
function.
Data
type
is
exactly
that
it's
a
pointer,
and
it
is,
it
is
basically,
it
is
basically
allocated
during
that
we
create
threats,
a
function
and
it
is
destroyed
after
the
finalizar
for
that
threats,
a
function
returns.
That
is
the
life
cycle
of
it.
Therefore,.
E
D
So
then
that's
the
implementation
that
I
did
and
then
I
made
three
different
tests,
one
where
you
are
creating
the
threads
passing
the
thread:
safe
function,
one
when
you're
creating
the
threads
passing
a
promise
for
the
thread
safe
function
and
then
it
eventually
gets
set
and
resolves.
So
that
was
addressing
your
recommendation
of
a
test
where
the
value
is
set
after
the
thread
is
created,
yeah
and
then
a
third
test
that
uses
a
uses,
acquire
and
release.
D
C
A
A
Like,
let's
say,
let's
say:
if
you
have
a
really
long
running
thread
and
you
you
create
the
thread
safe
function,
it
has
a.
It
has
a
thread
count
of
1,
because
obviously
you
need
to
do
it.
You
pass
it
to
the
thread
and
then
you
said
you
release
it
because
well
you
don't
need
it
anymore.
The
threads
will
take
care
of
things
right.
If
you
release
it
before
the
thread
has
had
a
chance
to
acquire
it.
Then
then,
yes,.
D
C
D
C
D
You
know,
and
so
it's
either
that
you
you
know,
maybe
you
start
it
at
one
and
then
you
give
something
back
to
node
that
allows
you
to
to
up
to
to
decrement
it
after
you've
finished
everything
or
you
when
you
create
your
threads
at
start
a
time.
You
already
know
that
the
total
number,
so
you
just
started
at
that
number.
You
know
and
then
those
are
the
two
use
cases
that
I
have,
but
then
in
like
one
of
the
tests,
it's
just
that
the
thread
safe
is
copied
after
the
thread
is
created
right.
A
The
only
the
only
question
that
remains
and
I
I
don't
know
if
we
can
answer
this
question
right
now
is
the
the
usage
pattern
that's
going
to
emerge
because
of
the
semantics
that
we
just
discussed
may
be
such
that
it
would
be,
it
would
be
addressed
by
an
automatic
acquire
and
automatic
release.
It
may
be,
you
know
so
so
you
know
if
you
cuz,
if
you
do,
if
you
send
like
five
copies
to
five
threads,
then
you
have
to
start
it
with
with
with
six
and
then
release
right.
So
so,
if
you.
D
A
With
six
one
for
you,
one
for
each
thread,
give
it
to
the
threads
and
then
release
right
all
right,
but
you
could
accomplish
the
same
thing
just
by
copying
it.
If
the
copy
were
to
have
the
automatic
acquire.
You
would
achieve
the
same
thing
right,
but
the
question
that
I,
don't
think
we
can
answer
right
now
is-
is
that
is
that
always
the
case?
Or
is
there
ever
a
reason
why
you
would
want
there
to
be
a
temporary
discrepancy
between
the
number
of
copies
and
a
number
of
declared
acquired
threads
right.
D
I
feel
like
it's,
you
you're,
adding
a
pretty
restriction,
then
that,
if
you
copy
you,
you
must
acquire
like
what,
if
I
just
want
to
have
or
just
copies
of
the
thread.
Safe
function,
just
to
have
copies
somewhere
like
what,
if
there's
a
programmatic
error
and
the
programmer
accidentally
creates
a
copy
without
I.
A
A
A
A
B
D
A
B
A
Holy
cow,
okay,
30,
K
lines,
yikes,
okay,
I,
don't
know
if
that's
gonna
happen
as
a
result,
it
would
just
be
like
a
tear
in
the
master
at
that
point,
but
I
don't
know.
Maybe
if
we
did
it,
if
we
did
it
step
by
step,
just
small
changes.
I
don't
know
if
you
could
do
that,
but
that
that's
an
issue
that's
been
raised:
I,
guess:
okay,
neutering
array,
buffer,
a
nice
thing
opening
link
a
new
tab.
So
this
is
a
request
for
this.
A
A
B
A
A
C
A
I
think
April
is
when
we
finally
completely
and
utterly
drop
a
version.
Is
it
not
I
think
it's
I
think
from
from
correct
miramount
from
October
till
April?
It
is
in
absolute
strictest
maintenance
mode
and
then
after
April
it
does
not
exist
as
far
as
we're
concerned,
but
I'd
have
to
double-check
either
way.
Okay,
yes,
yes,
thank
you
for
reminding
me
so
basically,
when
node
8
is
completely
out
of
service
and
completely
unsupported,
then
we
can
drop
it.
Okay,
all
right
and
I.
Think
it's
probably
marked
here:
okay,
holy
cow!
A
A
D
D
A
D
A
C
C
D
A
A
Wait
a
second
wait,
a
second
this
this
seems
fairly
simple
here,
so
so
basically
correct
me
if
I'm
wrong,
but
basically
the
crux
of
the
matter
is
here
right:
the
the
first
parameter
gets
stored,
it's
stored
in
a
variable
which,
which
is
accessed
from
from
here,
and
that's
perfectly
fine.
Normally,
however,
this
this
simply
needs
to
be
a
persistent
reference
rather
than
rather
than
just
a
regular
nappy
value.
I
think
that's
it,
but.
D
A
Consider
this
right!
If
and
when
this
function
is
garbage
collected
right,
this
reference
will
not
be
needed
anymore
because
it
will
never
be
used
here
ever
again
right,
correct.
So
then,
so
then
you
can
tie
the
lifecycle
to
this
right.
So
you
can
you
can
you
can
add
a
weak
reference
to
this
store
this
instead
of
doing
info
as
object,
do
new
nappy,
persistent
here
and
then
and
then
add
a
weak
reference
to
this
guy
to
to
to
the
result
of
this
call
that
that
will
free
that,
yes,
okay,.
D
A
A
A
Okay
well
they're
having
some
discussion
here:
okay,
I,
don't
think
I
can
read
up
on
all
of
it
now,
but
all
right
we're
kind
of
running
out
of
time.
So
there
are
more
issues
than
there
is
time.
So
we're
gonna
have
to
take
some
of
these
off
mine.
All
right,
I
think
I
think
we
can
call
it
right
any
any
other.