You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, count_up currently delays emissions with await HH\Asio\later(), but that's only practical if the consumer is on pace with it. A dense schedule (i.e. lots of resumable wait handles) helps. Here, where the requests are sparse, count_up is a tight loop pushing values into the buffer and hugely leaking memory.
The most immediate solution is to get rid of count_up, which isn't really so useful anyways. However, longer-term, it would be useful to distinguish between this "autonomous" iterator behavior and a consumer-tied iterator like amphp's yield $emit(...) to avoid accidental memory leaks like this.
The text was updated successfully, but these errors were encountered:
Suppose we wanted to keep count of requests:
Now,
count_up
currently delays emissions withawait HH\Asio\later()
, but that's only practical if the consumer is on pace with it. A dense schedule (i.e. lots of resumable wait handles) helps. Here, where the requests are sparse,count_up
is a tight loop pushing values into the buffer and hugely leaking memory.The most immediate solution is to get rid of
count_up
, which isn't really so useful anyways. However, longer-term, it would be useful to distinguish between this "autonomous" iterator behavior and a consumer-tied iterator like amphp'syield $emit(...)
to avoid accidental memory leaks like this.The text was updated successfully, but these errors were encountered: