Python threading._Timer() Examples

The following are 1 code examples for showing how to use threading._Timer(). These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.

You may check out the related API usage on the sidebar.

You may also want to check out all available functions/classes of the module threading , or try the search function .

Example 1
Project: plex-for-kodi   Author: plexinc   File: main.py    License: GNU General Public License v2.0 5 votes vote down vote up
def waitForThreads():
    util.DEBUG_LOG('Main: Checking for any remaining threads')
    while len(threading.enumerate()) > 1:
        for t in threading.enumerate():
            if t != threading.currentThread():
                if t.isAlive():
                    util.DEBUG_LOG('Main: Waiting on: {0}...'.format(t.name))
                    if isinstance(t, _Timer):
                        t.cancel()

                    try:
                        t.join()
                    except:
                        util.ERROR()