14 lines
253 B
Python
14 lines
253 B
Python
import asyncio
|
|
|
|
|
|
class Actor:
|
|
def __init__(self, name: str):
|
|
self.name = name
|
|
self.inbox = asyncio.Queue()
|
|
|
|
async def send(self, msg):
|
|
await self.inbox.put(msg)
|
|
|
|
async def run(self):
|
|
raise NotImplementedError
|