Implement OutputBuilder with locks.
Reader calls OutputBuilder instead of storing lines.