mstar.utils.containers

mstar.utils.containers#

Small generic containers with no engine or worker knowledge

Classes

RecentSet(maxlen)

Set of the maxlen most recently added items: O(1) add / in, FIFO eviction.

class mstar.utils.containers.RecentSet(maxlen)[source]#

Bases: Generic[T]

Set of the maxlen most recently added items: O(1) add / in, FIFO eviction. Readding a present item is a no-op (age not refreshed).

Parameters:

maxlen (int)

add(item)[source]#
Parameters:

item (T)

Return type:

None

maxlen#