It should be noted that it is NOT a server language, this means that it executes code, so it could be understood as an interpreter.
Node.js is currently being translated into 33 languages. I'm contributing to translate it into the Spanish language.
For this contribution, I have finished translating the N-api.md folder.
Previously, I briefly explained what an API is. If you want to see more information about it, you can visit this post.
The N-API is an API that ensures ABI stability across Node.js versions and different compiler levels. And an ABI (application binary interface) it's the interface between two program modules, it determines details such as how to call functions, in which binary format information should be passed from one program component to the next, or to the operating system in the case of a system call.
In this final part of the module, simple asynchronous operations are explained.
Additional modules often need to take advantage of the libuv asynchronous helpers as part of their implementation. This allows them to schedule the job to run asynchronously so that their methods can return before the job is completed. This is important to allow them to avoid blocking the general execution of the Node.js application.
It also explains the use of custom asynchronous operations, considering that the simple asynchronous work APIs may not be appropriate for each scenario, and these APIs are necessary to ensure that the execution time correctly tracks an asynchronous operation.
Recall that when an operation is asynchronous, the completion of the operation is notified to the main program and the processing of the response will be made at some future time.
I will use as an example the simple asynchronous operation function
This API cancels queued work if it has not yet been started. If it has already started executing, it cannot be cancelled and
napi_generic_failure will be returned. If successful, the complete callback will be invoked with a status value of
napi_cancelled. The work should not be deleted before the complete callback invocation, even if it has been successfully cancelled.
Esta API cancela el trabajo en cola, si aún no ha sido iniciado. Si ya comenzó a ejecutarse, no puede ser cancelado y
napi_generic_failure será devuelto. Si es exitoso, la callback complete será invocada con un valor de estado de
napi_cancelled. El trabajo no debe ser eliminado antes de la invocación de la callback complete, incluso si fue cancelado de manera exitosa.
I will also use the custom asynchronous operation function
This contribution was translated from English to Spanish.
The number of words reflected in the title doesn't include words that didn't require a translation.
- In this contribution, I've translated 1521 words.
- I've translated a total of 92815 words so far*
*Considering non-translatable content (proper names, functions, codes, etc.)
Previous translations on this project
- Maintaining-V8.md (v6.x)
- Maintaining-V8.md (v10.x)
Proof of Authorship
This counter includes non-translatable words, so it is necessary to work on more content to extract an average of 1000 translatable words.
You can check My Crowdin Profile for verify my contribution in this project.