Start New Discussion within our Software Development Community

Hello, I have a little problem.

My program (LH-ABC 3.2.0) works well in Windows XP and Vista. But in windows seven programa closed, but process keep going :S

What can be problem? Maybe one thread not closed? But this problem is exclusive in windows seven.

Source of my program in here: http://lh-abc.googlecode.com/files/LH-ABC_3.2.0_src.zip


Please help me!

Thank you for your attention.

Why don't you write a simple program using module threading and test it with Windows XP and then Windows7 and check the results. Some Windows versions have problems with prioritizing threads.

You can also use this simple test program that shows you how to turn off a thread ...

# note that threads don't end easily!

import threading

class TestThread(threading.Thread):

    def __init__(self, name='TestThread'):
        """ constructor, setting initial variables """
        self._stopevent = threading.Event()
        self._sleepperiod = 1.0  # in seconds

        threading.Thread.__init__(self, name=name)

    def run(self):
        """ main control loop """
        print "%s starts" % (self.getName(),)

        count = 0
        while not self._stopevent.isSet():
            count += 1
            print "loop %d" % (count,)
            self._stopevent.wait(self._sleepperiod)

        print "%s ends" % (self.getName(),)

    def join(self, timeout=None):
        """ stop the thread. """
        self._stopevent.set()
        threading.Thread.join(self, timeout)


if __name__ == "__main__":
    testthread = TestThread()
    testthread.start()

    import time
    time.sleep(10.0)

    testthread.join()
This question has already been answered. Start a new discussion instead.