about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-11-24 22:47:10 -0800
committerbors <bors@rust-lang.org>2013-11-24 22:47:10 -0800
commit07ad0ccadc6fb50c2b2dfe5dbd08a8612ab75b8c (patch)
treebb71d977fa769fc60d77a7f30f937e269cfc9835 /src/libsyntax/parse/parser.rs
parent2cc1e16ac0ee1fe5ea07125215e2ee1d39e63c12 (diff)
parent9fe8fc8836284643f13e148e3e8a09b643f3ff28 (diff)
downloadrust-07ad0ccadc6fb50c2b2dfe5dbd08a8612ab75b8c.tar.gz
rust-07ad0ccadc6fb50c2b2dfe5dbd08a8612ab75b8c.zip
auto merge of #10635 : alexcrichton/rust/issue-10626, r=cmr
This is both useful for performance (otherwise logging is unbuffered), but also
useful for correctness. Because when a task is destroyed we can't block the task
waiting for the logger to close, loggers are opened with a 'CloseAsynchronously'
specification. This causes libuv do defer the call to close() until the next
turn of the event loop.

If you spin in a tight loop around printing, you never yield control back to the
libuv event loop, meaning that you simply enqueue a large number of close
requests but nothing is actually closed. This queue ends up never getting
closed, meaning that if you keep trying to create handles one will eventually
fail, which the runtime will attempt to print the failure, causing mass
destruction.

Caching will provide better performance as well as prevent creation of too many
handles.

Closes #10626
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
0 files changed, 0 insertions, 0 deletions