X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Fversus-external-pools%2Ffunctions%2Ffunction-to-bench.js;h=eca756b715d3a0052c99db37aafe9cc6ab1e3492;hb=728b7bbdfbaf327a620aae50beb974b15a0a33d2;hp=3009054ee68658486b737f90ca060bd207a2f2b3;hpb=670734fc5562e286ce17b7f3075d115832e1436a;p=poolifier.git diff --git a/benchmarks/versus-external-pools/functions/function-to-bench.js b/benchmarks/versus-external-pools/functions/function-to-bench.js index 3009054e..eca756b7 100644 --- a/benchmarks/versus-external-pools/functions/function-to-bench.js +++ b/benchmarks/versus-external-pools/functions/function-to-bench.js @@ -1,11 +1,11 @@ +'use strict' /** - * The worker function to execute during pools benchmarks. - * NOTE: This function requires to be self-contained, thread-safe and re-entrant. - * + * The task function to execute during pools benchmarks. + * NOTE: This function requires to be self-contained, thread-safe and re-entrant (node-worker-threads-pool requirement). * @param {*} data The worker data. * @returns {*} The result. */ -function functionToBench (data) { +const functionToBench = (data) => { const crypto = require('crypto') const fs = require('fs') const TaskTypes = {