diff options
author | Eric Wong <e@yhbt.net> | 2020-01-12 21:17:50 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-01-13 23:21:24 +0000 |
commit | 8f23c134b6c9bfc9f23b3eed7811082e6d33a84c (patch) | |
tree | d13b03f5846ea2c903803825cba7a9c42e419cbd /lib/PublicInbox/HTTP.pm | |
parent | eb9c415ba4421cecb5157967c843dc7f8720e916 (diff) | |
download | public-inbox-8f23c134b6c9bfc9f23b3eed7811082e6d33a84c.tar.gz |
This does not affect our current code, but theoretically a DESTROY callback could call PublicInbox::DS::close to enqueue elements into the ToClose array. So take a similar strategy as we do with other queues (e.g. $nextq) by swapping references to arrays, rather than operating on the array itself. Since close operations are relatively rare, we can rely on auto-vivification via "push" ops to create the array on an as-needed basis. Since we're in the area, clean up the PostLoopCallback invocation to use the ternary operator rather than a confusing (to me) combination of statements. Finally, add a prototype to strengthen compile-time checking, and move it in front of our only caller to make use of the prototype.
Diffstat (limited to 'lib/PublicInbox/HTTP.pm')
0 files changed, 0 insertions, 0 deletions