Did I find the right examples for you? yes no

All Samples(16)  |  Call(16)  |  Derive(0)  |  Import(0)
Gets an element from the queue.

Blocks when empty until an element is returned.

src/w/i/wishbone-0.4.10/wishbone/test/testwishbonequeue.py   wishbone(Download)
    def test_get(self):
        queue = WishboneQueue()
        queue.put("test")
        assert queue.get() == "test"
 
        queue.getLock()
        try:
            queue.get()
        except QueueLocked:
            pass
        queue.getLock()
        try:
            queue.get()
        except QueueLocked:
            queue.getUnlock()
            assert queue.get() == "test"
 
        try:
            queue.get()
        except QueueLocked:
            pass

src/w/i/wishbone-HEAD/wishbone/test/testwishbonequeue.py   wishbone(Download)
    def test_get(self):
        queue = WishboneQueue()
        queue.put("test")
        assert queue.get() == "test"
 
        queue.getLock()
        try:
            queue.get()
        except QueueLocked:
            pass
        queue.getLock()
        try:
            queue.get()
        except QueueLocked:
            queue.getUnlock()
            assert queue.get() == "test"
 
        try:
            queue.get()
        except QueueLocked:
            pass