Update task.js

This commit is contained in:
Namhyeon Go 2021-07-28 13:55:14 +09:00 committed by GitHub
parent 02138ab366
commit b08a9477e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -231,10 +231,15 @@ function Promise(executor) {
this.executor(this.resolve, this.reject); this.executor(this.resolve, this.reject);
} }
function castToTask(f) {
return new Task(f, 0);
};
exports.__taskQueue__ = __taskQueue__; exports.__taskQueue__ = __taskQueue__;
exports.setTimeout = setTimeout; exports.setTimeout = setTimeout;
exports.setInterval = setInterval; exports.setInterval = setInterval;
exports.Promise = Promise; exports.Promise = Promise;
exports.castToTask = castToTask;
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// END Global functions // END Global functions
//////////////////////////////////////////////////// ////////////////////////////////////////////////////