Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] Thread issues


Chronological Thread 
  • From: "Bo Huang" < >
  • To: < >
  • Subject: [Manta] Thread issues
  • Date: Wed, 15 Apr 2009 10:09:31 -0400

This may be a bug: In Thread_Shutdown(), the line
    threadids.erase(GetCurrentThreadId());
is not protected by a mutex lock.

Question:
The priv->done and priv->delete_ready members of the struct Thread_private 
are semaphores with initial size 0 and max size 100. Normally, 
Thread_shutdown() releases priv->done by 1 as a one time procedure. If 100 
non-worker threads call proc0 Thread.Join(), does it mean only one will go 
through Join()?

Moreover, what might be the reason we do not use manta's Mutex or Semaphore 
abstractions for these two members (and other potential ones such as 
lock_scheduler() )?
 
Thanks



Archive powered by MHonArc 2.6.16.

Top of page