Files
reolink_api/util.py
Alano 5d03c62b39 adding blocking and non-blocking rtsp stream
This might fix the stream errors in issue #25
Also refactored the code a bit since we do not want to display a window from within the API (offload to the person implementing it).
2020-12-04 22:27:50 +02:00

11 lines
237 B
Python

from threading import Thread
def threaded(fn):
def wrapper(*args, **kwargs):
thread = Thread(target=fn, args=args, kwargs=kwargs)
thread.daemon = True
thread.start()
return thread
return wrapper