Did I find the right examples for you? yes no

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)
Sets queue in locked state.

When in locked state, elements can not be added or consumed.

src/w/i/wishbone-0.4.10/wishbone/test/testwishbonequeue.py   wishbone(Download)
    def test_lock(self):
        queue = WishboneQueue()
        queue.put("test")
        queue.lock()
        try:
    def test_rescue(self):
        queue = WishboneQueue()
        queue.lock()
        queue.rescue("test")
        queue.unlock()
        assert queue.get() == "test"
 
    def test_size(self):
        queue = WishboneQueue()
        queue.lock()
    def test_unlock(self):
        queue = WishboneQueue()
        queue.lock()
 
        try:

src/w/i/wishbone-HEAD/wishbone/test/testwishbonequeue.py   wishbone(Download)
    def test_lock(self):
        queue = WishboneQueue()
        queue.put("test")
        queue.lock()
        try:
    def test_rescue(self):
        queue = WishboneQueue()
        queue.lock()
        queue.rescue("test")
        queue.unlock()
        assert queue.get() == "test"
 
    def test_size(self):
        queue = WishboneQueue()
        queue.lock()
    def test_unlock(self):
        queue = WishboneQueue()
        queue.lock()
 
        try: