►
From YouTube: Node.js N-API Team meeting - June 8 2020
Description
No description was provided for this meeting.
If this is YOUR meeting, an easy way to fix this is to add a description to your video, wherever mtngs.io found it (probably YouTube).
A
B
So
take
it
away:
Kevin,
yes,
so
I
was
working
on
the
thread-safe
function,
context
again
and
I've
implemented
the
existing
thread-safe
tests
to
use
the
new
context
did
class
like
Gabe
had
suggested
so
I
created
a
new
PR
for
this,
and
it's
the
first
PR
on
the
list.
Now.
Okay,
I
want
me
to
share
that.
C
B
So
I,
its
node
internally
seems
to
be
calling
the
thread.
Safe
functions,
call
J
s
wrapper
with
an
empty
environment
and
I'm,
not
sure
why
this
is
happening,
if,
if
you
click
that
first
link
with
the
changes
to
do
so
so
this
is
really
what
we
needed
to
do
in
order
to
migrate
from
the
old
to
the
new.
The
change.
C
C
The
only
reason
why
that
would
be
happening
is
if
the
environment
is
shutting
down.
It's
basically
saying
that
the
environment
is
shutting
down.
You
can
no
longer
call
into
javascript,
but
here's
here's
the
rest
of
your
here's,
the
rest
of
your
Q,
so
that
you
can
clean
up
and
and
and
be
destroyed.
So.
B
B
C
D
C
B
B
C
C
But
no,
no,
no
sorry,
oh
yeah
empty
queue
and
delete
there.
It
is
okay,
nevermind,
so
final
ICB
gets
the
environment
but
empty
queue
and
delete
okay.
Let
me
go
to
empty
queue
and
delete
right.
Okay.
So
if
you
look
at
empty
queue
and
delete
in
the
in
the
threats
a
function,
implementation
it
does
that,
just
before
it
deletes
the
thread-safe
function
itself,
it
calls
it
caused
the
the
callback,
the
the
jr.,
the
G.
What
is
that
called
call
j
s?
C
It
calls
call
j
with
with
the
rest
of
the
contents
of
the
queue
but
with
the
environment
set
to
null
pointer
and
j/s
callback
set
to
null
pointer
and
that
the
reason
it
does
that
is,
to
give
the
the
threats
a
function,
a
chance
to
delete
the
remaining
items
on
the
queue
so
so
as
to
prevent
a
memory
leak.
That's
that's
why
that's
happening
so.
Basically,
basically,
what
I
think
is
happening
in
the
test.
C
Is
that
the
threats
a
function-
and
maybe
you
may
have
exposed
a
bug
that
was
always
there
in
the
test,
because
you
didn't
change
anything
in
the
in
the
way
that
the
timings
were
done
and
and
the
the
point
in
time
at
which
the
threats
a
function
was
being
released.
But
you
may
have
exposed
the
timing,
but
that
was
always
there.
It
just
never
happened
right.
C
So
so,
basically,
my
suspicion
is
that
the
the
threats
a
function
is
being
released
too
soon,
and
so
you
know
the
last
release
will
cause
it
to
to
start
to
get
finalized
and
then
and
then
you
you,
the
stack.
The
queue
is
not
empty
yet,
and
so
the
rest
of
the
queue
is
being
sent
to
call
j/s
using
a
null
environment
and
the
null
j/s
callback.
B
C
Environment
is
fine,
I
think
in
this
case
it's
just
it's
just
a
threat.
Safe
function
is
being
released
too
soon,
and
so
it
starts
to
finalize
before
the
queue
is
empty,
basically,
basically,
for
for,
for
the
purposes
of
the
tests,
you-you-you
need
to
know
what
it
is
that
you're
expecting
back
from
the
threat
safe
function,
and
you
must
only
release
the
threats,
a
function
from
the
main
thread
once
you
have
received
everything.
So
so,
if
you
call
stop
threads.
C
C
D
C
Saying
that
okay
create
threads,
stop
threads
right,
one
after
another,
in
JavaScript,
and
so
what
what?
What
that
will
do
is
it'll
it'll
cause
like
stop
threads
will
cause
the
main
thread
to
release
right,
which
is
good,
but
then,
but
then
all
the
secondary
threads
release.
The
thread
safe
function
as
well,
right
and.
B
C
Yeah,
don't
get
me
wrong,
I
mean
they
don't
release
it
sooner
than
they
normally
would.
Yes,
they
they
finish
processing,
they
put
everything
on
the
queue
and
then
they
release
the
thread
safe
function.
But
but
what
happens?
Is
you
you
end
up
with
you
end
up
with
a
bunch
of
at
least
one
outstanding
async
callback
in
the
event
loop
in
such
a
way
that
there
are
no
more
references
to
the
thread
safe
functions
because
the
threads
have
finished
processing
the
main
thread
have
have
finished,
sending
their
stuff.
C
The
main
thread
has
has
also
released
a
thread
safe
function
and
and
inside
the
event
loop.
There
is
at
least
one
pending
UV
async
callback
right,
which
will
which
would
reach
would
result
on
on
the
in
JavaScript
side
in
in
in
like
a
continuous
invocation
of
the
of
the
process.
One
item
thing
which
would
eventually
call
back
in
any,
would
call
call
J
s
right,
but
because
they
have
all
released
the
thread
safe
function
right.
C
That
loop
will
happen
not
not
as
part
of
the
normal
operations
of
the
thread
safe
function,
but
as
part
of
the
cleanup
of
the
threads
a
function.
This
empty
queue
and
delete
function
right
because
there
are
no
more
references
to
it,
there's
just
a
bunch
of
stuff
in
a
queue
and
no
more
references
to
the
thread
safe
function.
So
the
only
thing
the
threats
a
function
can
do
at
that
point
is
to
just
say:
hey
here's.
C
B
C
B
C
D
C
C
Fairly
certain
the
reason
I
am
I'm
fairly.
Certain
is
because
I
just
did
a
PR
that
that
runs
the
tests
in
worker
threads
and
and
I
ran
into
the
same
problem.
I
had
to
adjust
one
of
the
threats,
a
function,
threat,
I
believe
since
you
copied
the
threats,
a
function,
tests
I
believe
that
I
also
uncovered
the
the
same
race
that
you
uncovered
because
I
they
run
differently
now
that
they
run
in
worker
threads.
So
I
also
ran
into
the
same
problem
and
I
realize
hope.
I
wait
a
minute.
C
You
can't
just
you
can't
just
stop
the
the
the
the
you
can't
just
release
the
thread
safe
function
on
the
main
thread
until
you
have
everything
that
you
expect
otherwise,
you're
not
gonna
have
everything
that
you
expect
yeah
yeah.
It
was
called
test
threats
a
function
some
and
it
was
returning
zero
instead
of
instead
of
the
expected
some
and
the
reason
why
it
was
returning.
C
B
A
C
Yeah
there
are
four:
there
are
four
clean.
There
are
four
clean
commits
that
I
backported
and
there
there
was
one
commit
that
I
needed
to
write
from
scratch,
which
was
reviewed
by
Vienna
and
by
Lucas,
because
on
old
nodejs,
which
is
supported
in
two
point
X.
We
we
need
to
free
things
differently,
because
otherwise
you
get
a
double
free.
A
C
And
I'm
not
sure
like
in
this
case,
it
would
be
warranted
to
test,
because
that
these
are
like
genuine
code
changes
rather
than
rather
than
changes
to
code
that
that
is
essentially
dead.
So
I'm
not
sure
how
we're
gonna
do
that.
We
need
to
sort
of
turn
back
the
clock
to
the
platforms
on
which
we
tested
during
the
two
point:
X
timeframe
right.
C
C
D
A
C
F
If
you
click
on
the
blue
package
JSON
there,
it
will
it'll.
Take
you
to
the
example
in
its
context.
Okay,
so
I'm
really
I'm
really
pleased
with
that.
What
I'm
working
on
now
is
implementing
a
full-text
search
and
that
that
involves
getting
more
my
hands
dirty
with
deeper
into
the
Gatsby,
so
that
that's
taking
a
bit
of
time
but
I
feel
as
soon
as
I
get
the
search
going.
Then
I
think
we'll
be
ready
to
roll
this
out.
Okay,
the.
A
F
F
C
F
F
F
F
E
F
A
F
A
F
F
F
F
F
A
A
F
If
we
look
at,
let's
say
my
object:
dot,
H
and
Gabriel's,
this
has
been
working
on
this.
If
you
notice,
there's
a
static
function,
reference
for
this
guy.
Now,
if
we
go
to
the
C
code,
if
we
go
to
the
my
object
CC,
we
can
see
that
used
down
at
the
bottom.
I
I
am
baffled
as
to
why
why
somebody
would
want
to
do
this
in
in
this
day
and
age.
F
Okay,
okay,
okay,
so
that
that
that
okay,
that's
good
so
I
think
at
some
point,
once
we
get
once
we
get
the
new
site
up
and
and
once
Gabriel
you've
done,
all
your
work
I
think
we're
gonna
want
to
mark
some
of
the
stuff
deprecated
like
you.
This
is
good
for
historic,
but
it's
not
a
model
that
you
want
to
follow.
Yeah.
F
F
C
C
It
is
available
now
in
all
LTS
versions,
but
I
mean
it's
not
there
in
in,
like
eight
at
six
and
all
those
so
I
know
we
don't
support
them,
but
I
mean
if,
if
people
run
those
examples
and
if
people
run
code
against
eight
and
six,
then
then
this
stuff
will
not
work.
It
just
simply
won't
be
there.
In
fact,
in
fact,
Princeton's
data,
if
I'm
not
mistaken,
is
napi
six
and
there
are.
There
are
still
many
many
versions
of
node
like
twelve
and
ten
that
don't
have
an
api
six.
C
C
C
C
C
That's
how
we
did
it,
and
that
was
the
recommended
way
to
do
context
sensitive
add-ons
before
we
had
a
parade
on
instance
data,
but
now
that
we
have
the
prior
on
instance,
data
I'd
hesitate
to
create
a
complicated
example.
Only
to
simplify
it
later,
you
know
and
having
having
having
a
switch
that
happens
at
runtime
will
also
make
the
example
more
complicated
than
it
needs
to
be
right.
So.
A
A
This
is
the
way
and
and
with
some
comments
that
says
you
know
this
is
this
is
what
you
had
to
do,
but
don't
do
this
because
blah
blah
blah
right,
then
people
when
they
copy
that
code
or
come
to
it
it'd
be
harder
to
miss
I.
Think
by
having
it
all
in
one
file
in
one
example
versus
having
two
examples
where
you
have
to
find
the
right
one
yeah.
A
F
C
Yeah,
no
five,
five
I
think
four
or
five
had
the
environment.
Clean,
no
I
think
maybe
for
had
the
environment
clean
up
books
and
that
that's
pretty
well
disseminated
by
now
so
I'm
just
thinking,
maybe
I
shouldn't
even
use
the
print
since
outta.
Maybe
I
should
use
cleanup
hooks,
but
you
know
what
the
funny
thing
is:
I,
don't
think
we
ever
implemented
clean
up
hooks
properly
and
know
that
on
API
we
we
had.
We
had
like
a
cleanup
class
going
at
some
point,
but
I
don't
remember
us
merging
it.
C
C
C
A
C
A
C
A
I
guess
I'm
still
thinking
the
so
like
it
only
matters
in
twelve
and
fourteen
and.
A
C
C
C
C
C
C
A
A
A
C
A
G
A
F
A
C
A
G
F
F
F
C
F
A
C
Yeah,
okay,
okay,
I,
see,
I,
see
okay,
yeah
I.
Remember
the
discussion
so
yeah.
So
so
this
discussion
started
in
a
node,
add-on,
API
and,
and
this
person
wanted
to
illustrate
loading
so
starting
to
worker
threads
in
parallel
and
loading
the
add-on
from
both
worker
threads
right
because
they
found
they
found
that
that
they
were
crashing
and
so
and
I
remembered.
If
I
remember
correctly,
the
crash
it
might
have
been
that
it
might
have
been
that
handle
scope
thing
that
you're
working
on
Michael,
but.
A
C
Basically,
basically,
the
solution
was
to
to
not
use
global
static
in
their
case,
so
that
was
not
really
what
was
causing
the
crash
like
it
was
the
handle
scope,
but
that's
just
there
was
just
a
coincidence,
and
so
so
I
rewrote
the
tests,
and
so
that's
why
the
PR.
You
know
that
on
API
write
the
two
to
run
the
test
worker
threads,
but
this
one
this
person
wanted
not
to
just
start
a
process
started.
Worker
thread
run
the
test.
Stop
the
worker
thread
stop
the
process.
C
F
A
C
A
C
Right,
that's
right:
10
doesn't
have
to
clean
up
the
thread
clean
up,
but
it
does
have
worker
threads,
meaning
that
it
is
still
important
to
illustrate
that
it.
It
is
still
important
to
avoid
using
a
global,
statics,
even
intent,
and
so
this
example
is
relevant
for
10,
because
it
shows
how
not
to
use
global
statics
and
still
store
stuff
per
instance.
But.
C
A
C
C
No,
no,
what
I'm
saying
is
no!
No.
The
point
of
this
PR
is
startup
not
shut
down,
though
right
cuz
like
this
is
about
this
is
about
you
know
when
you
initialize
the
class
when
you,
when
you
initialize
the
constructor,
you
store
it
in
a
place
where
multiple
threads
will
not
clobber
each
other's
initialization.
F
C
A
B
C
A
A
A
F
C
Illustrating
avoiding
the
global
static
it
also.
It
also
adds
value
by
illustrating
how
to
launch
multiple
worker
threads,
each
of
which
load
the
the
the
add-on
right,
because
the
other
examples,
because
they
stem
from
a
time
when
no
J's
didn't
even
have
worker
threads,
they
simply,
they
simply
illustrate
good
form,
but
they
do
not
illustrate
the
effects
of
good
form
in
that.
If
you
do
load
it
multiple
times,
it
will
work
and
it
will
not
break
it
running,
whereas.
D
C
F
The
toriel's
right,
okay,
so
back
to
you,
yeah,
okay,
so
I'm
gonna
continue
work
on
digging
into
Gatsby
to
get
the
the
search
going
as
we
discussed
last
week,
Michael
there
there
are
two
ways
to
do
it:
one
is:
is
local
where
it
builds
the
index
as
part
of
the
CI
and
then
there's
another
option
where
you
use
an
external
service.
That
does
it
for
you,
so
I'm,
looking
at
the
local
version,
because
this
is
very
small
and
it
it
reduces
another
dependency
on
another
service.
F
So
yeah
I
know
I
think
if
we
can
do
it
is
like
github
action
or
whatever
locally.
That
would
definitely
be
great
yeah.
So
that's
where
rep
with
that
I'm,
like
I,
said
continuing
to
get
into
Gatsby,
to
figure
out
how
to
do
the
search
and
but
but
I'm
I'm
really
happy
with
what
we've
got
so
far.
Okay
sounds
good
yeah,
it's
looking
pretty
nice.
A
F
A
A
It's
it's
not!
That
I
mean
it's.
It's
like
a
lot
of
the
workshops
where
it's
like
hey,
you
can
go
off
and
self-directed
go
through
them.
Maybe
we
do
a
bit
of
an
intro,
but
other
than
that.
It's
that
you
know
we
have
people
there.
There
must
be.
They
must
be
planning
for
a
way
that
we
could
interact
with
people
and
help
them
well.
F
A
A
F
So,
essentially,
what
we're
saying
is
we
would
we
would
make.
We
would
make
team
members
available
for
a
window
of
time
yeah
and
to
work
with
people
who
are
working
on
napi
projects
and
if
they
don't
have
one,
if
they're
get
just
getting
started,
they
could
work
through
the
tutorials.
We
would
be
there
to
answer
questions
yeah.
A
F
A
F
A
A
I
just
think
I
should
have
been
similarly
like
if
there's
other
conference
at
virtual
conferences,
I
think
it'd
be
worthwhile
for
us
to
keep
in
mind
that
you
know
we
have
good
content
that
you've
worked
on
here
and
yeah.
You
know
spending
the
hours
to
show
up
at
and
and
help
do
it
as
a
workshop
makes
sense.
F
A
F
F
I
think
the
one
in
Boston
in
December
well
that
last
year
it
was
in
December,
I,
okay,
I
am
confused
right,
yeah,
I
think
I
did
a
look.
It
was
interactive
whatever
that
was.
F
A
F
D
A
B
A
F
A
A
Well,
I
think
that
I
think
there
was
at
least
one
or
two
that
had
for
some
pretty
significant
downloads,
but
it
seems
to
continually
be
going
up.
So
the.