Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] RE: Re: Thread issues


Chronological Thread 
  • From: "Bo Huang" < >
  • To: < >
  • Subject: [Manta] RE: Re: Thread issues
  • Date: Wed, 15 Apr 2009 11:57:27 -0400

Relevant to my previous thread related posts, I had crash problems at 
programming termination. One cause was traced to that line mentioned below, 
as threadids is a non-thread safe global var being modified unprotected by a 
lock.
 
I added a lock and it addressed that aspect the issues I encountered. Since I 
am on my own branch and on Windows, in case it is helpful I am bringing up 
this finding to the list rather than modifying the original.
 
Secondly, the questions I asked below were my ponderings when I was looking 
at the thread related code to debug relevant crashes like the aforementioned 
one.
 
Thanks

 
________________________________

From: 

 on behalf of James Bigler
Sent: Wed 4/15/2009 11:33 AM
To: 

Subject: [Manta] Re: Thread issues



So are you experiencing problems, or is this just something you
noticed in the code?

James

On Wed, Apr 15, 2009 at 8:09 AM, Bo Huang 
< >
 wrote:
> 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
>
>


<<winmail.dat>>




Archive powered by MHonArc 2.6.16.

Top of page