File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -567,6 +567,10 @@ async def send(self, value: SendType) -> None:
567
567
trio.ClosedResourceError: if you previously closed this
568
568
:class:`SendChannel` object, or if another task closes it while
569
569
:meth:`send` is running.
570
+ trio.BusyResourceError: some channels allow multiple tasks to call
571
+ `send` at the same time, but others don't. If you try to call
572
+ `send` simultaneously from multiple tasks on a channel that
573
+ doesn't support it, then you can get `~trio.BusyResourceError`.
570
574
571
575
"""
572
576
@@ -607,6 +611,10 @@ async def receive(self) -> ReceiveType:
607
611
:class:`ReceiveChannel` object.
608
612
trio.BrokenResourceError: if something has gone wrong, and the
609
613
channel is broken.
614
+ trio.BusyResourceError: some channels allow multiple tasks to call
615
+ `receive` at the same time, but others don't. If you try to call
616
+ `receive` simultaneously from multiple tasks on a channel that
617
+ doesn't support it, then you can get `~trio.BusyResourceError`.
610
618
611
619
"""
612
620
Original file line number Diff line number Diff line change @@ -147,7 +147,9 @@ def send_nowait(self, value):
147
147
148
148
@enable_ki_protection
149
149
async def send (self , value ):
150
- """See `~trio.abc.SendChannel.send`.
150
+ """See `SendChannel.send <trio.abc.SendChannel.send>`.
151
+
152
+ Memory channels allow multiple tasks to call `send` at the same time.
151
153
152
154
"""
153
155
await trio .hazmat .checkpoint_if_cancelled ()
@@ -259,7 +261,11 @@ def receive_nowait(self):
259
261
260
262
@enable_ki_protection
261
263
async def receive (self ):
262
- """See `~trio.abc.ReceiveChannel.receive`.
264
+ """See `ReceiveChannel.receive <trio.abc.ReceiveChannel.receive>`.
265
+
266
+ Memory channels allow multiple tasks to call `receive` at the same
267
+ time. The first task will get the first item sent, the second task
268
+ will get the second item sent, and so on.
263
269
264
270
"""
265
271
await trio .hazmat .checkpoint_if_cancelled ()
You can’t perform that action at this time.
0 commit comments