WillB97 / srcomp-pystream

SRComp HTTP EventStream and WebSocket module
MIT License
0 stars 1 forks source link

Clarify that these are existence checks #8

Closed PeterJCLaw closed 1 year ago

PeterJCLaw commented 1 year ago

Rather than being emptiness checks (as might otherwise be reasonably assumed given that a Queue is logically a collection).

PeterJCLaw commented 1 year ago

An alternative to this might be to just require that a queue is passed to the CachedState class, rather than letting it be a parameter with a None default. (And then removing these conditional checks.) All current callsites pass a value anyway, so there doesn't seem to be much benefit to this being optional.