python-trio / trio-asyncio

a re-implementation of the asyncio mainloop on top of Trio
Other
189 stars 38 forks source link

Attempt to clarify basic usage instructions. #12

Closed miracle2k closed 6 years ago

miracle2k commented 6 years ago

Refering to #11, I think my issues with the documentations are three fold:

  1. Confusion over trio.run vs trio_asyncio.run (I am still not sure if the later is a thing).
  2. A missing "full", simple example as to how to use it.
  3. Confusing what the different "modes" are, which one I am using, and how to use the other one. I am assuming I am using the "async mode" now, and that I do not need the "compatibility mode" (but it's not clear to me what that is).

This patch tries to fix point 2, and removes the reference to trio_asyncio.run, which we may have to bring back. Let me know what you think. I'll try to update the docs further with your feedback.

smurfix commented 6 years ago

I'm sorry that I have to reject this merge request, as I already rewrote much of that part of the documentation. (See the "merge" branch.)

If you think the current text still is too confusing, I'm inclined to remove the async with trio_asyncio.open_loop() part (or relegate it to a new subsection of the documentation) as most users won't need that.