Skip to content

Instantly share code, notes, and snippets.

View mrThe's full-sized avatar
🐓

mr.The mrThe

🐓
View GitHub Profile
function Miner(incr, dripK, delay) {
var that = this;
this.incr = incr || localStats.bps*1e3;
this.dripK = dripK || 0.5;
this.delay = delay || 100;
document.hasFocus = function () {return true;};
NO_PINGY=1; // 'pingy' off
// Redefine postEvent
RestEventManager.prototype.postEventData = function(e,t,next)
# Ruby Thread Pool
# ================
# A thread pool is useful when you wish to do some work in a thread, but do
# not know how much work you will be doing in advance. Spawning one thread
# for each task is potentially expensive, as threads are not free.
#
# In this case, it might be more beneficial to start a predefined set of
# threads and then hand off work to them as it becomes available. This is
# the pure essence of what a thread pool is: an array of threads, all just
# waiting to do some work for you!