[CalendarServer-changes] [6498] CalendarServer/branches/users/glyph/sharedpool/txdav/base/datastore/ asyncsqlpool.py

source_changes at macosforge.org source_changes at macosforge.org
Mon Nov 1 14:14:00 PDT 2010


Revision: 6498
          http://trac.macosforge.org/projects/calendarserver/changeset/6498
Author:   glyph at apple.com
Date:     2010-11-01 14:13:56 -0700 (Mon, 01 Nov 2010)
Log Message:
-----------
don't double-reclaim

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/sharedpool/txdav/base/datastore/asyncsqlpool.py

Modified: CalendarServer/branches/users/glyph/sharedpool/txdav/base/datastore/asyncsqlpool.py
===================================================================
--- CalendarServer/branches/users/glyph/sharedpool/txdav/base/datastore/asyncsqlpool.py	2010-11-01 21:13:37 UTC (rev 6497)
+++ CalendarServer/branches/users/glyph/sharedpool/txdav/base/datastore/asyncsqlpool.py	2010-11-01 21:13:56 UTC (rev 6498)
@@ -336,14 +336,9 @@
         returnValue({})
 
 
-    @inlineCallbacks
     def _complete(self, transactionID, thunk):
         txn = self._txns.pop(transactionID)
-        try:
-            yield thunk(txn)
-            returnValue({})
-        finally:
-            self.pool.reclaim(txn)
+        return thunk(txn).addCallback(lambda ignored: {})
 
 
     @Commit.responder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20101101/81b0750e/attachment.html>


More information about the calendarserver-changes mailing list