Skip to content

Commit 5e514f0

Browse files
committed
implement addPriority
1 parent d704a65 commit 5e514f0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/environment.js

+13
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,20 @@ class Environment extends Base {
14091409
);
14101410
});
14111411
}
1412+
1413+
/**
1414+
* Add priority
1415+
* @param {string} priority
1416+
* @param {string} before
1417+
*/
1418+
addPriority(priority, before) {
1419+
if (this.env.runLoop.queueNames.includes(priority)) {
1420+
return;
1421+
}
1422+
this.env.runLoop.addSubQueue(priority, before);
1423+
}
14121424
}
1425+
14131426
Object.assign(Environment.prototype, resolver);
14141427
Object.assign(Environment.prototype, composability);
14151428
Object.assign(Environment.prototype, spawnCommandMixin);

0 commit comments

Comments
 (0)