flush streams and join threads (render method as well)