WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-19-2008, 01:22 PM
RedSpikeyThing RedSpikeyThing is offline
Member
 
Join Date: Feb 2008
Posts: 9
Multithreading in Vizard 3.0

I'm currently using Vizard 3.0 and having trouble getting a simple multithreaded application to run. I wrote a script in IDLE using Python 2.3 (the same version as Vizard) and it works as expected. When it is run in Vizard, however, I get the following error:

"Unhandled exception in thread started by
Error in sys.excepthook:
Original exception was:
Unhandled exception in thread started by
Error in sys.excepthook:
Original exception was:
Unhandled exception in thread started by
Error in sys.excepthook:
Original exception was:
Unhandled exception in thread started by
Error in sys.excepthook:
Original exception was:"

The code is pretty simple and, as I said before, works as expected in IDLE.

Code:
import thread

def countingThread(id, maxVal):
    global printLock
    for i in range(maxVal):
        printLock.acquire()
        print "Thread ", id, ": ", i
        printLock.release()

global printLock
printLock = thread.allocate_lock()
for i in range(5):
    thread.start_new_thread(countingThread, (i, 50))
Any help would be greatly appreciated!!
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vizard won't run wouters Vizard 5 02-05-2008 11:12 AM
Fall 2007 release of Vizard R3 3 D Announcements 0 10-15-2007 04:50 PM
McAfee Privacy Service 8.1 causes Vizard not to run mspusch Vizard 0 03-01-2007 08:24 PM
Matlab and Vizard brystewa Vizard 1 09-18-2006 03:11 PM
wxPython with Vizard farshizzo Vizard 18 09-29-2005 08:49 AM


All times are GMT -7. The time now is 05:17 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC