Anna Henningsen
46eb417b6f
worker: use rwlock for sibling group
...
Since it is much more common to send messages than to add or
remove ports from a sibling group, using a rwlock is appropriate here.
Refs: https://github.com/nodejs/node/issues/38780#issuecomment-846548949
PR-URL: https://github.com/nodejs/node/pull/38783
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2021-05-25 07:19:04 -07:00
Tobias Nießen
17a527ec07
src: fix typo in node_mutex
...
PR-URL: https://github.com/nodejs/node/pull/38011
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-04-04 18:38:13 +05:30
Ben Noordhuis
b32fa7bcc6
src: add ExclusiveAccess class
...
Similar to Rust's `std::sync::Mutex` in that it requires one to unwrap
the object before accessing it, acquiring the mutex in the process.
PR-URL: https://github.com/nodejs/node/pull/31717
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: David Carlier <devnexen@gmail.com >
2020-02-13 20:53:35 +01:00
gengjiawen
b215bf9dac
src: inline macro DISALLOW_COPY_AND_ASSIGN
...
PR-URL: https://github.com/nodejs/node/pull/26634
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-03-17 21:58:22 -04:00
Anna Henningsen
09fce8562a
src: add missing NODE_WANT_INTERNALS guards
...
We generally add these to all headers that are considered
internal to Node.
These aren’t distributed as part of the headers tarball,
so I think this does not have to be semver-major
(and we have been changing the APIs in these headers
freely anyway).
PR-URL: https://github.com/nodejs/node/pull/22514
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-28 16:54:07 +02:00
Ben Noordhuis
d7087df4da
src: use RAII for mutexes and condition variables
...
We will be introducing many more critical sections in the upcoming
multi-isolate changes, so let's make manual synchronization a thing
of the past.
PR-URL: https://github.com/nodejs/node/pull/7334
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-06-21 10:29:14 +02:00