Node.js 11, uWS.nextTick, purely V8

This commit is contained in:
Alex Hultman 2018-11-03 12:35:42 +01:00
parent 100c93ffe4
commit 9e1b05608e
4 changed files with 124 additions and 83 deletions

5
dist/uws.js vendored
View file

@ -1,6 +1,9 @@
module.exports = (() => {
try {
return require(`./uws_${process.platform}_${process.versions.modules}.node`);
const uWS = require(`./uws_${process.platform}_${process.versions.modules}.node`);
/* We are not compatible with Node.js domain */
process.nextTick = (f, ...args) => uWS.nextTick(f.apply(...args));
return uWS;
} catch (e) {
throw new Error('This version of µWS is not compatible with your Node.js build.');
}