33 Usage
44+++++++
55
6- .. module: trio_asyncio
6+ .. module :: trio_asyncio
77
88Using :mod: `trio ` from :mod: `asyncio `, or vice versa, requires two steps:
99
@@ -74,6 +74,8 @@ the loop's context.
7474
7575.. autofunction :: trio_asyncio.run
7676
77+ .. autoclass :: trio_asyncio.TrioEventLoop
78+
7779.. note:
7880
7981 The ``async with open_loop()`` way of running ``trio_asyncio`` is
@@ -349,7 +351,7 @@ to wrap the iterator, not the code creating it – the following code
349351 async for n in aio_as_trio(aio_slow)():
350352 print(n)
351353
352- .. autodoc : trio_asyncio.aio_as_trio
354+ .. autofunction : : trio_asyncio.aio_as_trio
353355
354356
355357Too complicated?
@@ -375,7 +377,7 @@ code to Trio callers, but not vice versa.
375377
376378Thus, you really should not use it for "real" programs or libraries.
377379
378- .. autodoc : trio_asyncio.allow_asyncio
380+ .. autofunction : : trio_asyncio.allow_asyncio
379381
380382Calling Trio from asyncio
381383+++++++++++++++++++++++++
@@ -450,7 +452,7 @@ You can also wrap async generators or iterators::
450452 print(n)
451453 trio_asyncio.run(aio_as_trio, printer)
452454
453- .. autodoc: trio_asyncio. trio_as_aio
455+ .. autofunction :: trio_as_aio
454456
455457
456458Trio background tasks
@@ -461,7 +463,7 @@ If you want to start a Trio task that shall be monitored by ``trio_asyncio``
461463loop) instead of a :class: `asyncio.Future `, use
462464:meth: `trio_asyncio.TrioEventLoop.run_trio_task `.
463465
464- .. autodoc : trio_asyncio.TrioEventLoop.run_trio_task
466+ .. automethod : : trio_asyncio.TrioEventLoop.run_trio_task
465467
466468Multiple asyncio loops
467469++++++++++++++++++++++
@@ -482,7 +484,13 @@ method is mainly useful for servers and should be used as supplementing,
482484but not replacing, a ``finally: `` handler or an ``async with aclosing(): ``
483485block.
484486
485- .. autodoc: trio_asyncio.TrioEventLoop.autoclose
487+ .. automethod :: trio_asyncio.TrioEventLoop.autoclose
488+
489+ .. automethod :: trio_asyncio.TrioEventLoop.add_reader
490+ .. automethod :: trio_asyncio.TrioEventLoop.remove_reader
491+
492+ .. automethod :: trio_asyncio.TrioEventLoop.add_writer
493+ .. automethod :: trio_asyncio.TrioEventLoop.remove_writer
486494
487495Errors and cancellations
488496++++++++++++++++++++++++
@@ -526,6 +534,8 @@ There is one caveat: the executor must be either ``None`` or an instance of
526534:class: `trio_asyncio.TrioExecutor `. The constructor of this class accepts one
527535argument: the number of workers.
528536
537+ .. autoclass :: trio_asyncio.TrioExecutor
538+
529539------------------
530540 File descriptors
531541------------------
0 commit comments