This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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! |