Add an example of combining async work and promises #125
Conversation
|
Hi @legendecas, |
1a8e0aa
to
9bfd515
|
@NickNaso Updated :D |
|
LGTM |
|
The N-API calls must be rendered as two lines as described in the comment, otherwise they won't be compiled at all in release mode. |
4fee5db
to
b91b6e6
| @@ -0,0 +1,183 @@ | |||
| #include <stdio.h> | |||
| #include <stdlib.h> | |||
| #define NAPI_EXPERIMENTAL | |||
gabrielschulhof
Feb 21, 2020
•
Contributor
I guess it's unnecessary if every N-API used is already stable.
|
Why do the primes have to be stored in a linked list? Why not an array of size
Actually, come to think of it, |
b91b6e6
to
9b28d48
| NAPI_AUTO_LENGTH, | ||
| &work_name) == napi_ok); | ||
|
|
||
| // Create a deferred promise which we will resolve at the complete of the work. |
gabrielschulhof
Feb 24, 2020
Contributor
Nit:
| // Create a deferred promise which we will resolve at the complete of the work. | |
| // Create a deferred promise which we will resolve at the completion of the work. |
Co-Authored-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
|
LGTM |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Fixes nodejs/node-addon-api#634