Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use slots for ParkingLot and Event
Browse files Browse the repository at this point in the history
belm0 committed Apr 5, 2021
1 parent 6754c74 commit a21abe0
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion trio/_core/_parking_lot.py
Original file line number Diff line number Diff line change
@@ -85,7 +85,7 @@ class _ParkingLotStatistics:
tasks_waiting = attr.ib()


@attr.s(eq=False, hash=False)
@attr.s(eq=False, hash=False, slots=True)
class ParkingLot(metaclass=Final):
"""A fair wait queue with cancellation and requeueing.
2 changes: 1 addition & 1 deletion trio/_sync.py
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
from ._util import Final


@attr.s(repr=False, eq=False, hash=False)
@attr.s(repr=False, eq=False, hash=False, slots=True)
class Event(metaclass=Final):
"""A waitable boolean value useful for inter-task synchronization,
inspired by :class:`threading.Event`.

0 comments on commit a21abe0

Please sign in to comment.