Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(11)  |  Call(8)  |  Derive(0)  |  Import(3)

src/c/o/concurrence-HEAD/lib/concurrence/memcache/client.py   concurrence(Download)
from concurrence.io.socket import Socket
from concurrence.io.buffered import BufferedStream
from concurrence.containers.deque import Deque
 
import cPickle as pickle
    def connect(self, addr):
        assert self._stream is None, "must not be disconneted before connecting"
        self._stream = BufferedStream(Socket.connect(addr, Timeout.current()))
        self._command_queue = Deque()
        self._response_queue = Deque()

src/c/o/concurrence-HEAD/scripts/httpperf.py   concurrence(Download)
from concurrence.http.client import HTTPConnection
from concurrence.statistic import gamma_filter
from concurrence.containers.deque import Deque
from optparse import OptionParser
 
    def session(self, host, port, path):
        cnn = None
 
        pipeline_tokens = Deque()
 

src/c/o/concurrence-HEAD/test/testdeque.py   concurrence(Download)
 
import time
 
from concurrence import dispatch, Tasklet, TimeoutError, unittest
from concurrence.containers.deque import Deque
 
class TestDeque(unittest.TestCase):
    def testNonBlock(self):
        d = Deque()
        self.assertEqual(20, d.popleft())
 
        d = Deque()
        d.append(10)
        d.append(20)
        self.assertEqual(20, d.pop())
        self.assertEqual(10, d.pop())
 
    def testBlock(self):
        d = Deque()
    def testBlock2(self):
        d = Deque()
        Tasklet.later(0.5, d.append)(10)
        Tasklet.later(1.0, d.append)(20)
        Tasklet.sleep(1.5)