summaryrefslogtreecommitdiff
path: root/Mailman/ListAdmin.py
diff options
context:
space:
mode:
authorbwarsaw2002-04-01 16:31:25 +0000
committerbwarsaw2002-04-01 16:31:25 +0000
commitd05d2eb75b106c0302e53961a92c65b17aea7f7b (patch)
treeea7c19e8bd2d9fecf5fd8ef535a30735a93f54d9 /Mailman/ListAdmin.py
parent03746ddd239e39255fabb84c08e649325572b864 (diff)
downloadmailman-d05d2eb75b106c0302e53961a92c65b17aea7f7b.tar.gz
mailman-d05d2eb75b106c0302e53961a92c65b17aea7f7b.tar.zst
mailman-d05d2eb75b106c0302e53961a92c65b17aea7f7b.zip
Make it much cheaper to call Load(), especially when the state hasn't
changed since the last Load(). This means it will be cost effective to reload the state when necessary in qrunners which don't lock the list (e.g. OutgoingRunner). Specifically, InitTempVars(): Set a temporary timestamp attribute, which gets the mtime of the config.pck file upon successful load. __save(): When we save the file, set the timestamp to the file's mtime (we just saved it so it must be up-to-date -- since this is done with the list lock acquired, there shouldn't be a race). __load(): If the file's mtime is <= the current timestamp, then we've got the most current state. This method can now return (None, None) meaning we didn't need to load anything. Load(): Watch for dict is None and e is None, meaning we didn't need to load anything.
Diffstat (limited to 'Mailman/ListAdmin.py')
0 files changed, 0 insertions, 0 deletions