in reply to Re: Completely Random Stall
in thread Completely Random Stall

So how could I detach the threads? Can I do so within the thread it self by calling threads->detach(); from within the thread? ? Also I honestly think you're right, hundred or so threads down the line its just stalling (but the previously running threads ' sub-processes are still running).

Replies are listed 'Best First'.
Re^3: Completely Random Stall
by BrowserUk (Patriarch) on Jun 12, 2008 at 15:07 UTC
    So how could I detach the threads?

    I showed you exactly how to do it above? Change threads->detach; to $thr->detach;.

    detach() is an instance method. That is, you need to call it upon the thread handle you wish to detach. You are currently calling it as a class method, which makes no sense, and if warnings were enabled, would (probably) raise an error.

    Does your OS have a tool that will show you how many threads are running when the stall occurs? Also, are your child processes being cleaned up or are you creating lots of zombies?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      Hey BrowserUK, Thank you kindly for your reply, I've looked into it and added it the way you've described. Well the processes that they call end up getting full out exited (with SIGTERM) so I can only assume they do infact clean up afterwards. I'm running fedora core, so ptrace does show me the memory trace, but I'm not sure as to what else I could be using. Any advice would be greatly appreciated. -Kevin

        Sorry, but I don't know what tools are available on your system for this kind of thing. I know top can show processes and the parent-child releationship, but I've no idea how you would monitor the threads within a process on Linux.

        On win32, this is displayed using the default Task Manager, and several better replacements.

        Maybe someone who does will point you in the right direction.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.