dabeaz / curio

Good Curio!
Other
4.01k stars 240 forks source link

`curio.Queue.put` does not appear to work from sync context as documented. #299

Closed pipermerriam closed 4 years ago

pipermerriam commented 5 years ago

Looking at the documentation here: https://github.com/dabeaz/curio/blob/0ac46615a2c009f327aba0632b193eb36df3695e/docs/devel.rst#synchronousasynchronous-queuing it suggests I should be able to use curio.Queue.put from a sync context without using await.

I'm still new to curio so maybe I've missed something, but I was unable to make this work (though it does work if I use a curio.UniversalQueue. Wanted to confirm that I'm not missing something here.

dabeaz commented 5 years ago

I think this is a documentation error. It should be using UniversalQueue. I've made a fix to the documentation.