mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
removed unused defer function
This commit is contained in:
parent
0f026551fe
commit
ea30fb1b73
1 changed files with 0 additions and 20 deletions
|
|
@ -35,26 +35,6 @@ def application():
|
||||||
yield app
|
yield app
|
||||||
|
|
||||||
|
|
||||||
def defer(delay, func):
|
|
||||||
"""Append artificial delay to `func`
|
|
||||||
|
|
||||||
This aids in keeping the GUI responsive, but complicates logic
|
|
||||||
when producing tests. To combat this, the environment variable ensures
|
|
||||||
that every operation is synchonous.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
delay (float): Delay multiplier; default 1, 0 means no delay
|
|
||||||
func (callable): Any callable
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
delay *= float(os.getenv("PYBLISH_DELAY", 1))
|
|
||||||
if delay > 0:
|
|
||||||
return QtCore.QTimer.singleShot(delay, func)
|
|
||||||
else:
|
|
||||||
return func()
|
|
||||||
|
|
||||||
|
|
||||||
class SharedObjects:
|
class SharedObjects:
|
||||||
jobs = {}
|
jobs = {}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue