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

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

src/c/o/concurrence-HEAD/examples/chat.py   concurrence(Download)
def handle(client_socket):
    """handles a single client connected to the chat server"""
    stream = BufferedStream(client_socket)
 
    client_task = Tasklet.current() #this is the current task as started by server

src/c/o/concurrence-HEAD/lib/concurrence/http/server.py   concurrence(Download)
        #the current task (the one created to handle the socket connection) is the controller task,
        #e.g. it coordinates the actions of it's children by message passing
        control = Tasklet.current()
 
        #writes responses back to the client when they are ready:

src/c/o/concurrence-HEAD/lib/concurrence/memcache/client.py   concurrence(Download)
                    assert False, "unknown protocol state, cmd: %s, response_line: %s" % (cmd, response_line)
        except Exception, e:
            block_channel.send_exception(TaskletError, e, Tasklet.current())
            raise 
 
            self._response_queue.append((cmd, block_channel))
        except Exception, e:
            block_channel.send_exception(TaskletError, e, Tasklet.current())
            raise
 
        #raise exception on all waiting tasks still in the queues
        for cmd, args, block_channel in self._command_queue:
            block_channel.send_exception(TaskletError, e, Tasklet.current())
        for cmd, block_channel in self._response_queue:
            block_channel.send_exception(TaskletError, e, Tasklet.current())

src/c/o/concurrence-HEAD/test/testcore.py   concurrence(Download)
                    MSG_PONG.send(parent)(20)
 
        parent = Tasklet.current()
        child = Tasklet.new(c)(parent)
        i = 0