Skip to content
Permalink
Browse files

fixed undeclared variable

  • Loading branch information
slinger360 committed Jan 3, 2020
1 parent 02e15b6 commit a1b41ef2845f367dc88d17afe1bc23370123eb46
Showing with 3 additions and 1 deletion.
  1. +3 −1 utils.py
@@ -22,12 +22,13 @@ def sidethread(fn):
a separate thread but, only if sidethread isn't already running
"""
def wrapped(*args, **kwargs):
global th0
if th0.is_alive() == False:
th0 = Thread(target=fn, args=args, kwargs=kwargs)
th0.start()
else:
tprint('sidethread is already active')

return wrapped

def specialthread(fn):
@@ -36,6 +37,7 @@ def specialthread(fn):
a separate thread
"""
def wrapped(*args, **kwargs):
global th1
th1 = Thread(target=fn, args=args, kwargs=kwargs)
th1.start()

0 comments on commit a1b41ef

Please sign in to comment.
You can’t perform that action at this time.