<commit_before>/*global Promise:true*/
var Promise = require('bluebird');

var workQueue = {
    queue: [],
    drain: function () {
        this.queue.forEach(function (fn) {
            fn();
        });
        this.queue = [];
    }
};

var scheduler = Promise.setScheduler(function (fn) {
    workQueue.queue.push(fn);
    scheduler(function () {
        workQueue.drain();
    });
});


var _notifyUnhandledRejection = Promise.prototype._notifyUnhandledRejection;
Promise.prototype._notifyUnhandledRejection = function () {
    var that = this;
    var args = arguments;
    scheduler(function () {
        if (that._isRejectionUnhandled()) {
            throw that.reason();
        }
    });
};

module.exports = workQueue;<commit_msg>Removed dead code<commit_after>/*global Promise:true*/
var Promise = require('bluebird');

var workQueue = {
    queue: [],
    drain: function () {
        this.queue.forEach(function (fn) {
            fn();
        });
        this.queue = [];
    }
};

var scheduler = Promise.setScheduler(function (fn) {
    workQueue.queue.push(fn);
    scheduler(function () {
        workQueue.drain();
    });
});


Promise.prototype._notifyUnhandledRejection = function () {
    var that = this;
    scheduler(function () {
        if (that._isRejectionUnhandled()) {
            throw that.reason();
        }
    });
};

module.exports = workQueue;
{'fraction_non_alphanumeric': 0.14852198990627252, 'fraction_numerical': 0.0, 'mean_word_length': 2.5318066157760812, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5348157', 'n_tokens_mistral': 418, 'n_tokens_neox': 416, 'n_words': 73}