Skip to content

Commit c438604

Browse files
Update TUTORIAL.md
Added task_done and join functions in the Queue section of the tutorial.
1 parent 07108cc commit c438604

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

v3/docs/TUTORIAL.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,12 +973,15 @@ Synchronous methods (immediate return):
973973
queue is full.
974974
* `get_nowait` No arg. Returns an object from the queue. Raises an exception
975975
if the queue is empty.
976+
* `task_done` No arg. Indicate that a task associated with an enqueued item is complete.
976977

977978
Asynchronous methods:
978979
* `put` Arg: the object to put on the queue. If the queue is full, it will
979980
block until space is available.
980981
* `get` No arg. Returns an object from the queue. If the queue is empty, it
981982
will block until an object is put on the queue.
983+
* `join` No arg. Block until all items in the queue have been received and
984+
processed (indicated via task_done).
982985

983986
```python
984987
import uasyncio as asyncio

0 commit comments

Comments
 (0)