- whack the OutputStream statemachine with mutexes and conditional variables (from guenther@, thanks!)