Check if thread is waiting for input or frozen

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?R2lkaQ==?=

    Check if thread is waiting for input or frozen

    Hi,

    Is it possible to have thread that will check if another thread is waiting
    for User input or frozen?

    thanks,
    Gidi.
  • kimiraikkonen

    #2
    Re: Check if thread is waiting for input or frozen

    On May 18, 5:41 pm, Gidi <shna...@hotmai l.com.dontspamw rote:
    Hi,
    >
    Is it possible to have thread that will check if another thread is waiting
    for User input or frozen?
    >
    thanks,
    Gidi.
    Hi,
    Check thread's isAlive and ThreadState properties that may help you.

    Thanks,

    Onur Güzel

    Comment

    • Peter Duniho

      #3
      Re: Check if thread is waiting for input or frozen

      On Sun, 18 May 2008 07:41:00 -0700, Gidi <shnapsi@hotmai l.com.dontspam>
      wrote:
      Is it possible to have thread that will check if another thread is
      waiting
      for User input or frozen?
      Define "frozen". That's not a standard technical term in Windows
      programming and could mean any variety of things.

      That said, it should not be necessary for you to do this. You will
      probably get better advice if you explain why it is you think you want to
      do this and what you hope to accomplish.

      Pete

      Comment

      • Matt

        #4
        Re: Check if thread is waiting for input or frozen

        On May 18, 5:45 pm, "Peter Duniho" <NpOeStPe...@nn owslpianmk.com>
        wrote:
        On Sun, 18 May 2008 07:41:00 -0700, Gidi <shna...@hotmai l.com.dontspam 
        wrote:
        >
        Is it possible to have thread that will check if another thread is  
        waiting
        for User input or frozen?
        >
        Define "frozen".  That's not a standard technical term in Windows  
        programming and could mean any variety of things.
        Generally, I think he means "not responding". I agree, however, that's
        not very clear. Does it mean not receiving user input, or not using
        any
        CPU time or...
        >
        That said, it should not be necessary for you to do this.  You will  
        probably get better advice if you explain why it is you think you want to  
        do this and what you hope to accomplish.
        I would imagine he's looking for a heartbeat sort of mechanism to see
        whether a program has "died" and needs to be restarted. Having written
        more than my share, it sounds like the description given.

        Matt

        Comment

        • Peter Duniho

          #5
          Re: Check if thread is waiting for input or frozen

          On Sun, 18 May 2008 16:58:09 -0700, Matt <matttelles@spr ynet.comwrote:
          >Define "frozen".  That's not a standard technical term in Windows  
          >programming and could mean any variety of things.
          >
          Generally, I think he means "not responding". I agree, however, that's
          not very clear. Does it mean not receiving user input, or not using any
          CPU time or...
          The phrase "not responding" isn't very clear either. What does
          "responding " mean? For a thread with a message pump, this often (though
          not necessarily) means that the thread is pumping messages. But most
          threads don't have a message pump. And many types of threads can sit and
          process for long periods of time without ever interacting with any other
          thread. Are those threads "not responding", even though they are working
          exactly as designed?
          >That said, it should not be necessary for you to do this.  You will  
          >probably get better advice if you explain why it is you think you want
          >to  
          >do this and what you hope to accomplish.
          >
          I would imagine he's looking for a heartbeat sort of mechanism to see
          whether a program has "died" and needs to be restarted. Having written
          more than my share, it sounds like the description given.
          Well, only Gidi can elaborate. Thus my question. We can speculate until
          the cows come home, without a more descriptive question I don't see any
          way to offer practical advice.

          Pete

          Comment

          Working...