Skip to content

Instantly share code, notes, and snippets.

View MCardus's full-sized avatar

Marc Cardús MCardus

View GitHub Profile
@MCardus
MCardus / thread_pool_skeleton.py
Last active October 17, 2016 14:16
Thread pool skeleton for Python
#Code based in @dgorissen script from stackoverflow
import os
from subprocess import call
from Queue import Queue
from threading import Thread
class Worker(Thread):
"""Thread executing tasks from a given tasks queue"""
def __init__(self, tasks):
Thread.__init__(self)