other changes

This commit is contained in:
David Brazda
2023-11-15 09:02:15 +01:00
parent aead08a2c9
commit dc4c10a4a3
15 changed files with 380 additions and 29 deletions

25
testy/picklequeue.py Normal file
View File

@ -0,0 +1,25 @@
import queue
import msgpack
# Creating the original queue
original_queue = queue.Queue()
new_queue = queue.Queue()
# Adding elements to the original queue
original_queue.put(5)
original_queue.put(10)
original_queue.put(15)
# Pickling the queue
pickled_queue = msgpack.packb(original_queue)
# Unpickling the queue
unpickled_queue = msgpack.unpackb(pickled_queue)
# Pickling the queue
new_queue.queue = unpickled_queue.queue
print(new_queue)
# Checking the contents of the new queue
while not new_queue.empty():
print(new_queue.get())