MCPcopy Create free account
hub / github.com/KoboldAI/KoboldAI-Client / debounced

Function debounced

utils.py:52–62  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

50def debounce(wait):
51 def decorator(fun):
52 def debounced(*args, **kwargs):
53 def call_it():
54 fun(*args, **kwargs)
55
56 try:
57 debounced.t.cancel()
58 except AttributeError:
59 pass
60
61 debounced.t = Timer(wait, call_it)
62 debounced.t.start()
63
64 return debounced
65

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected