- # task list
- # outsiders request operations by putting (fn, args...) tuples on _q
- # the worker thread (created below) will perform these operations in order
- self._q = Queue.Queue()
- tools.as_daemon_thread(self._run)
-
- def ensure_created(self, rec):
- """Cause the account specified by <rec> to exist if it doesn't already."""
- self._q.put((self._ensure_created, rec.copy()))