in reply to Threaded Perl script not responding

But when I give some interrrupt signal ctrl + z, it resumes the process.. I dont know what causes that..

It sounds like your threads are hanging on something and waiting for input to proceed. Have you noticed that other key presses work too? Like maybe just hitting Enter a few times? Are you running a socket or database access in the threads? Threads can hang on a screwed up IO operation.

How I can check for any errors in a thread here?

With the limited code you show, it's only a suggestion, but sprinkle your \&processData subroutine with as many debugging printouts as you can, and see where it hangs and requires your cntrl z.


I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh
  • Comment on Re: Threaded Perl script not responding

Replies are listed 'Best First'.
Re^2: Threaded Perl script not responding
by Anonymous Monk on Aug 17, 2011 at 18:00 UTC
    Are you running a socket or database access in the threads? Threads can hang on a screwed up IO operation.

    I am using database access inside the thread and a lot of I/O operation. How can I refresh the thread or do some kind of check to make sure the threads are active. I just do not understand an interrupt signal just resumes the threads to go active again?