diff --git a/trio/_core/_parking_lot.py b/trio/_core/_parking_lot.py index 8b114b5230..e0f57ff8fa 100644 --- a/trio/_core/_parking_lot.py +++ b/trio/_core/_parking_lot.py @@ -80,12 +80,12 @@ _counter = count() -@attr.s(frozen=True) +@attr.s(frozen=True, slots=True) 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.