Вагапова Деши Насрудиновна, 316 группа TwoWay 10504
Вячеслав Крет, 525 группа TwoWay 10506
f1import asynciof1import 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
n16        res = await super().wait()n16        result = await super().wait()
17        await asyncio.sleep(0)17        await asyncio.sleep(0)
t18        return rest18        return result
1919
20    async def reset(self):20    async def reset(self):
21        self._topic = None21        self._topic = None
22        return await super().reset()22        return await super().reset()
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op