WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-20-2004, 11:49 AM
tavaksai tavaksai is offline
Member
 
Join Date: Jul 2004
Posts: 22
threads

Hi Farshizzo,

Yes, viz.director() stops also even without a single execution of <multimedia>.play() and <multimedia>.play() eventually stops working without any viz.director() calls.

Try running the following code:

import thread
import time
import viz
viz.go()

def myfunc():
sum = 0
for i in range(100000):
sum = sum + i
print 'sum is:', sum

for i in range(100):
thread.start_new_thread(myfunc, ())

On my computer, which by the way has plenty of memory, I only get 47 outputs of "sum is 4999950000" even though I create 100 threads and I get a message in red that says, "error: can't start new thread". You can replace the last line above with viz.director(myfunc) and you will get the same result except that no error message will be displayed.

Max
Reply With Quote
Reply


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


All times are GMT -7. The time now is 03:34 AM.


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