Sehr geehrte Damen und HerrenHi Louis,
>     
>     > What makes you so sure, that it's a real deadlock?
>     
>     
>     Well, the fact that I'm not getting any memory errors with memcheck 
>     shows that all objects are created and free'd properly. Also I don't get 
>     any exception. The reasonable assumption in a multithreaded app would be 
>     deadlock.
Hmmm, the absence of any particular evidences does not mean that the assuption 
MUST be right, it could....
So, the general fixup to avoid deadlocks is

for each process
1. Get the required resources one after the other in a well defined order (that 
can be alfabetically!)
2. If you cannot get one, release them all and re-try after a short time

Do not wait in one thread for the competion of another one, instead use a 
controlling mechanism which is signalled each completion.

But as far as I understand you, you already tried that.

It sounds a bit as if all the treads share the same piece of code, you could 
build a controlling program, which can query the threads
for a status-var indicating how far each of them has come.

Happy de-bugging!

Bob


PS: Do the threads share memory? I do not know exactly if each thread has its 
own address-range, but i think so.

>     
>     > A deadlock situation is defined as:
>     > one process owning some resources waiting for another resource to 
>     > become available which is owned by a second process that is waiting 
>     > for a resource to become available which is already owned by the first 
>     > process.
>     > looking complicated eh?
>     
>     
>     No the definition makes perfect sense.
>     
>     > Becomes more complicated, if you have several processes.
>     
>     
>     Yep, the app is very complicated and runs several different threads. 
>     Trust me, if I had time to rewrite it, I would.
>     
>     > I made the experience of hanging programs when I used threads for the 
>     > first time. that problem was addressed by termination and freeing of 
>     > threads.
>     
>     
>     I already checked that. All threads are terminated properly (if they 
>     don't lock).
>     
>     > Threads can be debugged, you can place breakpoints into your 
>     > thread-code, there is a thread-window in the ide though sometimes the 
>     > ide crashes and has to be restarted.
>     
>     
>     Yeah, but I can still only debug one thread at a time, which is not very 
>     useful in my case.
>     
>     >
>     > last (NOT LEAST): if you are using a multi-processor environment THERE 
>     > ARE LOTS OF BUGS IN THE OS!!!
>     > try googeling for multitread errors.
>     
>     
>     No, single processor in my case.
>     
>     >
>     > Have fun, thoug it can be hard sometimes
>     
>     
>     No kidding.
>     
>     Cheers
>     Louis
>     
>     
>     -----------------------------------------------------
>     Home page: http://groups.yahoo.com/group/delphi-en/
>     To unsubscribe: [EMAIL PROTECTED] 
>     Yahoo! Groups Links
>     
>     
>     
>      
>     
>     



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to