Skip to content

Commit da7329a

Browse files
author
Ram Rachum
committed
White night...
1 parent fad2fd1 commit da7329a

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

src/garlicsim/edgecruncher.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,16 @@
3131
"""
3232

3333

34-
import wx
35-
from multiprocessing import *
3634
#from core import *
3735
import threading
38-
import Queue as QueueModule
36+
import Queue as queue
3937

4038
try:
4139
from misc.processpriority import set_process_priority
4240
except:
4341
pass
4442

45-
class EdgeCruncher(Process):
43+
class EdgeCruncher(threading.Thread):
4644
"""
4745
EdgeCruncher is a subclass of multiprocessing.Process. An EdgeCruncher
4846
is responsible for crunching the simulation in the background.
@@ -60,13 +58,13 @@ def __init__(self,starter,step_function,*args,**kwargs):
6058
self.starter=starter
6159
self.daemon=True
6260

63-
self.work_queue=Queue()
61+
self.work_queue=queue.Queue()
6462
"""
6563
The EdgeCruncher puts the work that it has completed
6664
into this queue, to be picked up by sync_workers.
6765
"""
6866

69-
self.message_queue=Queue()
67+
self.message_queue=queue.Queue()
7068
"""
7169
This queue is used by sync_workers to send instructions
7270
to the EdgeRenderer.
@@ -85,13 +83,9 @@ def run(self):
8583
The function ran by EdgeCruncher. Does the actual work.
8684
"""
8785

88-
"""
89-
import simulations.life.life as simulation
90-
import core
91-
import wx
92-
"""
9386
try:
94-
self.set_priority(0)
87+
#self.set_priority(0)
88+
pass
9589
except:
9690
pass
9791

0 commit comments

Comments
 (0)