Skip to content

Commit

Permalink
Use slots for _TaskWrapper and Callback (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
circuitsacul authored Mar 21, 2022
1 parent 218442b commit fad29f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hikari_clusters/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ class Callback:
The clients that should be responding to this callback.
"""

__slots__ = ("ipc", "key", "responders", "resps", "future")

def __init__(self, ipc: IpcClient, key: int, responders: Iterable[int]):
self.ipc = ipc
self.key = key
Expand Down
2 changes: 2 additions & 0 deletions hikari_clusters/task_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@


class _TaskWrapper:
__slots__ = ("allow_cancel", "allow_wait", "t")

def __init__(
self, allow_cancel: bool, allow_wait: bool, t: asyncio.Task[Any]
) -> None:
Expand Down

0 comments on commit fad29f3

Please sign in to comment.