Skip to content

Instantly share code, notes, and snippets.

View kmalakoff's full-sized avatar

Kevin Malakoff kmalakoff

View GitHub Profile
@kmalakoff
kmalakoff / gist:e3b42107da348d6119a3
Last active November 17, 2015 14:33
readdirp serial
'use strict';
var fs = require('graceful-fs')
, _ = require('lodash')
, path = require('path')
, minimatch = require('minimatch')
, toString = Object.prototype.toString
;
// Standard helpers
@kmalakoff
kmalakoff / gist:1225029
Created September 18, 2011 12:24
Javascript / Coffeescript background task / job / thread - single and multiple array batch iteration with cancellation using background.js (https://github.com/kmalakoff/background)
Using background.js (https://github.com/kmalakoff/background)...
constructor: ->
@processing_count = 0
@transformations_job_queue = new BGJobQueue(100)
_transformationsChangeCallback: ->
# reset the job queue to start again rather than waiting for the last batch to complete
@processing_count++; @_updateProcessingMesage()
@transformations_job_queue.clear()