Add a mutex to contents for printing
Add a mutex to contents for printing

This allows for a contents buffer to be displayed on the screen
without undefined behavior when modified from another thread.

czipperz/vick,czipperz/vick