Antoine Pitrou wrote:
> 1M concurrent database transactions? Does that sound reasonable at
> all? Your database administrator probably won't like you.
I agree that 1M concurrent transactions would not be reasonable for the vast majority of database configurations, I didn't mean to specifically imply that 1M would be something reasonable today. That's why I said "a large number of concurrent transactions" instead of specifically saying "1M concurrent transactions". I honestly don't know if any databases are close to capable of handling that many transactions at once, at least not at the present time.
But, although we may think it's ridiculous today, who's to say that won't be an occurrence in the future? Imagine a scenario where there was a massive super-cluster of database servers, that performed real-time update transactions every time a single item was checked in and out of some global inventory system.
Currently, something like this would likely have to be implemented through batching, where x number of updates have to be queued or x amount of time has to pass before the next transaction is started. Alternatively, each facility or region would have its own local database that synchronizes with the global database every so often. But, there could be a significant advantage in having a near-perfectly synchronized global inventory system, which would only be possible if it was updated in real-time. IMO, the max number of concurrent transactions that the a database system can handle at once is a very clear application of Moore's Law.
My point being is that I don't want to arbitrarily restrict how many coroutine objects can exist at once without having a strong reason for doing so AND having a limit that's reasonable in the long term. 1M would have the advantage of being easy to remember, but other than that I see no reason why that should specifically be the limit for the max number of coroutines. As Guido mentioned at the start of the thread, a coroutine object is "just another Python object and has no operating resources associated with it". Other than main memory usage, there's no other external limit to the max number of coroutine objects that can exist at once.
Note: Although coroutines were already dropped from PEP 611, I felt that this response was still worthwhile to write. I suspect that the topic of "coroutine object limits" is likely to come up again in the future.