Message343818
> A coroutine detection is a relatively slow check.
> I don't think we need to do it in `functools.lru_cache`.
Wouldn't a coroutine check only happen during decoration time? To successfully solve this easily and efficiently, we only really need to wrap the coroutine with `asyncio.ensure_future` if the decorated function is a coroutine, and it will only happen when a result comes back from the decorated function which would have minimal impact.
Of course, I don't know much about the internals of `lru_cache` so my assumptions could be wrong. I should familiar myself with the implementation and figure out how doable it would be. |
|
Date |
User |
Action |
Args |
2019-05-28 20:44:49 | Liran Nuna | set | recipients:
+ Liran Nuna, brett.cannon, asvetlov, yselivanov, xtreak |
2019-05-28 20:44:49 | Liran Nuna | set | messageid: <1559076289.38.0.717847005603.issue35040@roundup.psfhosted.org> |
2019-05-28 20:44:49 | Liran Nuna | link | issue35040 messages |
2019-05-28 20:44:49 | Liran Nuna | create | |
|