Changeset 4328

Show
Ignore:
Timestamp:
07/11/07 17:12:20 (6 years ago)
Author:
DrewCormier
Message:

starting to rearrange the way I'm starting up my threads

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • experimental/components/GraphPy/branches/0.6.1/GraphPy/GraphPy.py

    r4324 r4328  
    7272    def configure(self, props): 
    7373        print "GraphPy configure called" 
    74         buffer_size = 0 
    75           
     74        self.app_thread = threading.Thread(target=app.MainLoop) 
     75        self.app_thread.start() 
     76  
    7677    def query(self, props): 
    7778        return self.propertySet 
     
    137138 
    138139 
    139  
    140 class my_threads: 
    141     def __init__(self): 
    142  
    143         self.app_thread = threading.Thread(target=app.MainLoop) 
    144         self.app_thread.start() 
    145  
    146         self.orb_thread = threading.Thread(target=ORB_Init_fun) 
    147         self.orb_thread.start() 
    148140 
    149141class GraphFrame(wx.Frame): 
     
    386378#------------------------------------------------------------------- 
    387379# Code run when this file is executed 
     380# 
     381# Defines some important global variables 
    388382#------------------------------------------------------------------- 
    389383if __name__ == "__main__": 
     
    396390    print "Identifier - " + uuid + "  Label - " + label 
    397391     
    398     app = App() 
    399          
    400     threads_running = my_threads() 
    401  
     392    app = App()   # need an app for the gui stuff 
     393 
     394    # start the orb in a thread that will run in parallel to the GUI         
     395    orb_thread = threading.Thread(target=ORB_Init_fun) 
     396    orb_thread.start() 
     397