How to combine multiprocessing and eventlet
I have a task need to start 2 processes and within each process need to start 2 threads to do really work. Below is the source code I used to simulate my use case. import multiprocessing import eventlet def subworker(num1, num2): print 'Start subworker %d,%d\n' % (num1, num2) eventlet.sleep(10) print 'End subworker %d,%d\n' % (num1, num2) def worker(**kwargs): number = kwargs['number'] pool = eventlet.GreenPool(size=2) pool.spawn_n(subworker, number, 1) pool.spawn_n(subworker, number, 2) pool.waitall() def launcher(number): kwargs = {'number': number} th = multiprocessing.Process(target=worker