Beta9 includes a concurrency-safe distributed queue, accessible both locally and within remote containers.Serialization is done using cloudpickle, so any object that supported by that should work here. The interface is that of a standard python queue.Because this is backed by a distributed queue, it will persist between runs.
Simple Queue
Copy
Ask AI
from beta9 import Queueval = [1, 2, 3]# Initialize the Queueq = Queue(name="myqueue")for i in range(100): # Insert something to the queue q.put(val)while not q.empty(): # Remove something from the queue val = q.pop() print(val)