title: Sqlalchemy session.flush with threading
body: <p>I am currently using scoped_session provided by sqlalchemy with autocommit=True and autoflush=True. </p>
  
  <p>I notice that autoflush is no called properly as some of the updated results are not flushed when my script finishes executing. </p>
  
  <p>Is autoflush not meant to be run with scoped_session in a multithreaded environment? </p>