Files
Collector/collector/helper.py
ducoterra bcaf5144fb init
2020-04-05 14:15:31 -04:00

14 lines
379 B
Python

import functools
import threading
def thread(func, after, *args, **kwargs):
func = functools.partial(func, *args, **kwargs)
call = lambda after, func: after(func())
t = threading.Thread(
target = call,
args = (after, func)
)
t.start()
def get_missing(required, provided):
return list(filter(lambda item: item not in provided, required))