コード例 #1
0
ファイル: imapserver.py プロジェクト: andresp/offlineimap
 def connectionwait(self):
     """Waits until there is a connection available.  Note that between
     the time that a connection becomes available and the time it is
     requested, another thread may have grabbed it.  This function is
     mainly present as a way to avoid spawning thousands of threads
     to copy messages, then have them all wait for 3 available connections.
     It's OK if we have maxconnections + 1 or 2 threads, which is what
     this will help us do."""
     threadutil.semaphorewait(self.semaphore)
コード例 #2
0
ファイル: imapserver.py プロジェクト: mmehnert/offlineimap
 def connectionwait(self):
     """Waits until there is a connection available.  Note that between
     the time that a connection becomes available and the time it is
     requested, another thread may have grabbed it.  This function is
     mainly present as a way to avoid spawning thousands of threads
     to copy messages, then have them all wait for 3 available connections.
     It's OK if we have maxconnections + 1 or 2 threads, which is what
     this will help us do."""
     threadutil.semaphorewait(self.semaphore)