NET-Web-API-w-Angular/my-app/node_modules/piscina/test/fixtures/send-buffer-then-get-length.js

19 lines
317 B
JavaScript
Raw Normal View History

2024-02-09 00:38:41 +00:00
'use strict';
const Piscina = require('../../dist/src');
let time;
module.exports = {
send: async () => {
const data = new ArrayBuffer(128);
try {
return Piscina.move(data);
} finally {
setTimeout(() => { time = data.byteLength; }, 1000);
}
},
get: () => {
return time;
}
};