15 lines
323 B
Python
15 lines
323 B
Python
|
import asyncio
|
||
|
|
||
|
class ReadOnlyQueue():
|
||
|
|
||
|
def __init__(self, queue):
|
||
|
self.queue = queue
|
||
|
|
||
|
async def get(self):
|
||
|
"""
|
||
|
Get the next item from queue, which has items in the format (priority, data)
|
||
|
:return: next item from the queue
|
||
|
"""
|
||
|
return (await self.queue.get())[1]
|
||
|
|