Потапова Дарья Сергеевна, группа 524 TwoWay 10770
Рогинко Алла 321гр TwoWay 10752
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        idx = await super().wait()n16        result = await super().wait()
17        await asyncio.sleep(0)17        await asyncio.sleep(0)
t18        return idxt18        return result
1919
20    async def reset(self):20    async def reset(self):
21        await super().reset()21        await super().reset()
22        self._topic = None22        self._topic = None
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op