process-once.node
v1.0.1
Published
run function once in one process
Readme
process-once.node
The pthread_once(3) binding to the Node.js community.
Installation
$ npm install process-once.node --saveExample
const once = require('process-once.node');
once(() => {
// run this function once in this process
});Purposes
- this package is for learning how
pthread_onceworks. - this package is experimental and could be replaced with simple call function directly.
License
MIT
