Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
throwway2332
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
throwway2332
4y ago
// 3 requests in flight result1 = async_task1(); result2 = async_task2(); result3 = async_task3(); Depends on implementation, some are eager, some are lazy.
2.
▲
by
throwway2332
4y ago
> I thought Python couldn't multithread because of GIL? Why would it need to in this case? You only need one thread for concurrent I/O.
3.
▲
by
throwway2332
4y ago
> to allow concurrency, you should use asyncio.create_task on coro (formerly ensure_future). This is misleading... you can use asyncio.gather which does this internally [0]. [0]: https://github.com/python/cpython