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

All Samples(19)  |  Call(12)  |  Derive(0)  |  Import(7)

src/c/o/concurrence-HEAD/lib/concurrence/http/server.py   concurrence(Download)
import rfc822
 
from concurrence import Tasklet, Message, Channel, TimeoutError, __version__
from concurrence.io import Server, BufferedStream
from concurrence.containers import ReorderQueue
            self._n = int(content_length)
            self._file = reader.file()
            self._channel = Channel()
 
    def _read_request_data(self):

src/c/o/concurrence-HEAD/scripts/httpperf.py   concurrence(Download)
#!/usr/bin/env stackless
 
from concurrence import dispatch, quit, Tasklet, Channel
from concurrence.http.client import HTTPConnection
from concurrence.statistic import gamma_filter
        self.lastTime = None
        self.options = options
        self.dispenser = Channel()
 
    def session_response_reader(self, cnn, pipeline_tokens):

src/c/o/concurrence-HEAD/lib/concurrence/http/client.py   concurrence(Download)
import logging
 
from concurrence import Tasklet, Channel, Message, __version__
from concurrence.timer import Timeout
from concurrence.io import Connector, BufferedStream

src/c/o/concurrence-HEAD/lib/concurrence/memcache/client.py   concurrence(Download)
# the New BSD License: http://www.opensource.org/licenses/bsd-license.php
 
from concurrence import Tasklet, Channel, TaskletError
from concurrence.timer import Timeout
from concurrence.io.socket import Socket
    def _do_command(self, cmd, *args):
        block_channel = Channel()
        self._command_queue.append((cmd, args, block_channel))
        try:
            return block_channel.receive()

src/c/o/concurrence-HEAD/lib/concurrence/database/pool.py   concurrence(Download)
import time
 
from concurrence import TimeoutError, Channel, Tasklet
from concurrence.containers import Deque
from concurrence.timer import Timeout
 
        #watch for server disconnects on idle connections:
        self._idle_disconnect_channel = Channel()
        self._idle_disconnect_reaper_task = Tasklet.loop(self._idle_disconnect_reaper, daemon = True)()
 

src/c/o/concurrence-HEAD/test/testtimer.py   concurrence(Download)
from __future__ import with_statement
 
import time
 
from concurrence import unittest, Tasklet, Channel, TimeoutError
    def testTimer(self):
 
        ch = Channel()
 
        def sender(times):

src/c/o/concurrence-HEAD/test/testcore.py   concurrence(Download)
import sys
 
from concurrence import unittest, Tasklet, Channel, TimeoutError, TaskletError, JoinError, Message
 
class TestTasklet(unittest.TestCase):
                recvd.append(res)
 
        looper_channel = Channel()
        looper_task = Tasklet.loop(looper)(looper_channel)
 
        recvd = []
 
        test_channel = Channel()
 
        send_task = Tasklet.new(sender)(test_channel)
    def testRecvTimeout(self):
 
        #receive within timeout
        test_channel = Channel()
        t1 = Tasklet.later(1.0, test_channel.send)(10)
 
        #receive with timeout
        test_channel = Channel()
        t1 = Tasklet.later(2.0, test_channel.send)(10)
        try: