Detecting Remaining Thread

Discussion in 'Python' started by Damian Johnson, Jan 19, 2011.

  1. Hi, I've been trying to track down a familiar concurrency problem
    without any success:
    Unhandled exception in thread started by
    Error in sys.excepthook:

    Original exception was:

    I realize that this is due to a background thread still being alive
    and kicking when the application terminates (ie, a missing join() on a
    helper thread). However, threading.enumerate() is reporting that
    nothing except for the main thread is running at that point:
    1/19/2011 09:30:41 [INFO] Arm is shutting down. Remaining threads:
    [<_MainThread(MainThread, started -1217079616)>]

    What other methods are there for troubleshooting this sort of issue?
    I've triple checked that my threads are daemons and joined when
    quitting but I must be missing something...

    As would be expected of a timing issue, this happens intermittently
    (1/5 of the time) and goes away if I add a short sleep at the end. Any
    help would be much appreciated. Thanks! -Damian
    Damian Johnson, Jan 19, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hupjack
    Replies:
    4
    Views:
    774
    hupjack
    May 5, 2004
  2. =?Utf-8?B?TFU=?=
    Replies:
    1
    Views:
    466
    Raterus
    Mar 24, 2005
  3. Rhino
    Replies:
    2
    Views:
    417
    Rhino
    Feb 11, 2005
  4. Rhino
    Replies:
    1
    Views:
    527
    Oliver Wong
    Dec 21, 2005
  5. M Hedges
    Replies:
    2
    Views:
    3,805
    M Hedges
    Feb 14, 2004
Loading...

Share This Page