add readonly=True flag to Session to produce threadsafe session

Issue #697 resolved
Mike Bayer repo owner created an issue

this flag will disallow the transactional/autoflush flags, disallow begin()/create_transaction(), and set a "synchronize" flag on the resulting Query; Query then places a lock around _execute_and_instances() when this flag is in place.

add a few tests and a little doc.

Comments (3)

  1. Mike Bayer reporter

    we have enough to do without complicating the session; applications can produce their own locking code and facades if they want a threadsafe query object.

  2. Log in to comment