responder icon indicating copy to clipboard operation
responder copied to clipboard

Docs: being more explicit about why to use api.background.task

Open butla opened this issue 5 years ago • 2 comments

Hey! When I was reading the docs and I saw api.background.task, the first thing that popped into my head was "but you can just use asyncio.create_task or loop,.run_in_executor for that without inventing something new!". But then I noticed that it also passes the context vars to the synchronous backround stuff, which is nice. Wonder why that's not the case in the stdlib, cause it would be nice :)

All I'm asking is: would you welcome a docs PR explaining api.background.task to asyncio purists like myself? :)

butla avatar Feb 05 '20 20:02 butla

Yes, we would love to !

taoufik07 avatar Feb 05 '20 22:02 taoufik07

Nice. I'll try to write something up in the next few days

butla avatar Feb 05 '20 22:02 butla