action22k TwoWay 10462
Долгих Данила TwoWay 10629
t1import asynciot1import asyncio
22
3class Portal(asyncio.Barrier):3class Portal(asyncio.Barrier):
44
5    def __init__(self, parties):5    def __init__(self, parties):
6        super().__init__(parties)6        super().__init__(parties)
7        self._topic = None7        self._topic = None
88
9    @property9    @property
10    def topic(self):10    def topic(self):
11        return self._topic11        return self._topic
1212
13    async def wait(self, topic=None):13    async def wait(self, topic=None):
14        if topic is not None:14        if topic is not None:
15            self._topic = topic15            self._topic = topic
16        return await super().wait()16        return await super().wait()
1717
18    async def reset(self):18    async def reset(self):
19        self._topic = None19        self._topic = None
20        await super().reset()20        await super().reset()
2121
22    async def abort(self):22    async def abort(self):
23        self._topic = None23        self._topic = None
24        await super().abort()24        await super().abort()
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op