/head: changeset 68

More work on threads
This commit is contained in:
jgoerzen 2002-07-04 03:40:31 +01:00
parent f53273ffc3
commit 8efda69ef0

View File

@ -18,7 +18,6 @@
from offlineimap import imaplib, imaputil, threadutil
from threading import *
import sys
class UsefulIMAPMixIn:
def getstate(self):
@ -82,9 +81,6 @@ class IMAPServer:
self.availableconnections.append(connection)
self.connectionlock.release()
self.semaphore.release()
print "%d connections used after release" % len(self.assignedconnections)
sys.stdout.flush()
def acquireconnection(self):
"""Fetches a connection from the pool, making sure to create a new one
@ -101,8 +97,6 @@ class IMAPServer:
self.assignedconnections.append(imapobj)
del(self.availableconnections[0])
self.connectionlock.release()
print "%d connections used after acquire" % len(self.assignedconnections)
sys.stdout.flush()
return imapobj
self.connectionlock.release() # Release until need to modify data
@ -124,8 +118,6 @@ class IMAPServer:
self.connectionlock.acquire()
self.assignedconnections.append(imapobj)
self.connectionlock.release()
print "%d connections used after acquire" % len(self.assignedconnections)
sys.stdout.flush()
return imapobj
def connectionwait(self):