-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathtask_handler.pyi
54 lines (39 loc) · 1.21 KB
/
task_handler.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# MIT license; Copyright (c) 2021 Amir Gonnen
# Copyright (c) 2024 - 2025 Kevin G. Schlosser
from typing import Callable, ClassVar, Optional
from machine import Timer
_default_timer_id: int = ...
def _default_exception_hook(e: Exception):
...
##############################################################################
class TaskHandler(object):
_current_instance: Optional[ClassVar["TaskHandler"]] = ...
duration: int = ...
refresh_cb: Optional[Callable] = ...
_timer: Timer = ...
_task_handler_ref: Callable = ...
exception_hook: Callable[[Exception], None] = ...
max_scheduled: int = ...
_scheduled: int = ...
def __init__(
self,
duration: int = 33,
timer_id: int = _default_timer_id,
max_scheduled: int = 2,
refresh_cb: Optional[Callable] = None,
exception_hook: Callable[[Exception], None] = _default_exception_hook
):
...
def deinit(self) -> None:
...
def disable(self) -> None:
...
def enable(self) -> None:
...
@classmethod
def is_running(cls) -> bool:
...
def _task_handler(self, _) -> None:
...
def _timer_cb(self, _) -> None:
...