Commit 0dfd0761 authored by Matthew Fernandez's avatar Matthew Fernandez
Browse files

use stdio locking instead of print mutex

We were using a mutex to protect our accesses to printf, but printf also does
its own stream locking on stdout and friends. We can't simply drop our locking
because some of our usages involve multiple calls to printf that need to appear
together. However, we can replace our mutex with explicit stream locking and
then used unlocked I/O. This has the potential to be a slight performance win
because we avoid the overhead of acquiring an unnecessary mutex as well as some
printf parsing overhead.

Github: closes #192 "evaluate use of flockfile and unlocked stdio"
parent caedd386
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment