This is better in that there is far less boilerplate, but it doesn't solve everything. Async iteration was retrofitted onto an API that wasn't designed for it, and it shows. Features like BYOB (bring your own buffer) reads aren't accessible through iteration. The underlying complexity of readers, locks, and controllers are still there, just hidden. When something does go wrong, or when additional features of the API are needed, developers find themselves back in the weeds of the original API, trying to understand why their stream is "locked" or why releaseLock() didn't do what they expected or hunting down bottlenecks in code they don't control.
Opens in a new window
,这一点在PDF资料中也有详细论述
But e-bikes containing lithium-ion batteries are a newer challenge. "When a battery fails, it doesn't necessarily ignite, it will often produce some off-gases," says Stephen Welch, senior lecturer at the University of Edinburgh's Fire Research Centre. "Those off-gases are toxic and flammable. If they accumulate, you can have an explosion risk."
There are also *Var (variable) variants for all argument access methods.