Maybe I just do not understand how Threading works entirely in Python, but to my understanding, the following code should be able to perform both loops simultaneously.
from threading import Thread
class minerThread(Thread):
def __init__(self):
Thread.__init__(self)
self.daemon = True
def startMining(self,mineFunc):
while True:
print "geg"
def Main():
go=1
miner=minerThread()
miner.start()
miner.startMining("addr")
while go>0:
print "mine"
#Enter main loop
if(__name__ == "__main__"):
Main()
but instead, the program just hangs on the startMining loop from the thread.
Does anyone know whats going on?