feat: 补齐桌面端下载播放,并将窗口改为夜间主题和应用图标
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import threading
|
||||
|
||||
|
||||
class LiveHub:
|
||||
def __init__(self) -> None:
|
||||
self._condition = threading.Condition()
|
||||
self.revision = 0
|
||||
|
||||
def touch(self) -> None:
|
||||
with self._condition:
|
||||
self.revision += 1
|
||||
self._condition.notify_all()
|
||||
|
||||
def wait(self, seen: int, timeout: float = 20) -> int:
|
||||
with self._condition:
|
||||
if self.revision == seen:
|
||||
self._condition.wait(timeout)
|
||||
return self.revision
|
||||
|
||||
|
||||
live = LiveHub()
|
||||
Reference in New Issue
Block a user