From: pioardi Date: Mon, 20 Jan 2020 10:54:01 +0000 (+0100) Subject: Examples folder created X-Git-Tag: v0.0.1~23 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=c68d4281d92ef0da01fc89fb00a93d3a17ba392e;p=poolifier.git Examples folder created --- diff --git a/dynamicExample.js b/examples/dynamicExample.js similarity index 91% rename from dynamicExample.js rename to examples/dynamicExample.js index 11032a92..d483684d 100644 --- a/dynamicExample.js +++ b/examples/dynamicExample.js @@ -1,4 +1,4 @@ -const DynamicThreadPool = require('./lib/dynamic') +const DynamicThreadPool = require('../lib/dynamic') let resolved = 0 let maxReached = 0 const pool = new DynamicThreadPool(100, 200, './yourWorker.js', { errorHandler: (e) => console.error(e), onlineHandler: () => console.log('worker is online') }) diff --git a/normal.js b/examples/normal.js similarity index 100% rename from normal.js rename to examples/normal.js diff --git a/staticExample.js b/examples/staticExample.js similarity index 89% rename from staticExample.js rename to examples/staticExample.js index 074f37ca..49dc02a5 100644 --- a/staticExample.js +++ b/examples/staticExample.js @@ -1,4 +1,4 @@ -const FixedThreadPool = require('./lib/fixed') +const FixedThreadPool = require('../lib/fixed') let resolved = 0 const pool = new FixedThreadPool(15, './yourWorker.js', diff --git a/yourWorker.js b/examples/yourWorker.js similarity index 87% rename from yourWorker.js rename to examples/yourWorker.js index 34a85dbb..5036d574 100644 --- a/yourWorker.js +++ b/examples/yourWorker.js @@ -1,5 +1,5 @@ 'use strict' -const { ThreadWorker } = require('./lib/workers') +const { ThreadWorker } = require('../lib/workers') class MyWorker extends ThreadWorker { constructor () {