Made streaming partially threadsafe for the timer thread to call commits
periodically
exposed the commit method