You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the wait queue use case, ParkingLot is efficient and doesn't generate garbage.
However if a wait queue is needed on anyio, you'd have to use Event and create a new instance on each set(). Event doesn't use slots, and contains ParkingLot which also doesn't use slots. So that's two unslotted class instances per set().
Any reason not to use slots on these classes?
The text was updated successfully, but these errors were encountered:
belm0
added a commit
to belm0/trio
that referenced
this issue
Apr 5, 2021
For the wait queue use case, ParkingLot is efficient and doesn't generate garbage.
However if a wait queue is needed on anyio, you'd have to use Event and create a new instance on each set(). Event doesn't use slots, and contains ParkingLot which also doesn't use slots. So that's two unslotted class instances per set().
Any reason not to use slots on these classes?
The text was updated successfully, but these errors were encountered: