Тулебаев Адильхан, 416 группа TwoWay 11032
Вагапова Деши Насрудиновна, 316 группа TwoWay 10504
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        res = await super().wait()16        res = await super().wait()
17        await asyncio.sleep(0)17        await asyncio.sleep(0)
18        return res18        return res
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