def commit_async(self, msg, callback=None, data=None): # TODO in generic baseclass have this default to using # commit() + the wrapper call the callback #~ print '!! ASYNC COMMIT' operation = AsyncOperation(self._commit, (msg,), lock=self._lock, callback=callback, data=data) operation.start()
def _start_async_operation(self): args = self.async_queue[0] operation = AsyncOperation( self._create_thumbnail, args=args, callback=self._async_callback, data=self.async_queue[0]) operation.start()