kdeforche/wt — pull request #52 by tsaquet (2014-03-07 15:43:42+00:00)
Title: Optional mutex on Transaction

Replace previous pull request : https://github.com/kdeforche/wt/pull/46

Add the possibility to use Wt::Dbo::Transaction with a single Wt::Dbo::Session shared within multiple static resources.

It is retrocompatible : the boolean added to manage the lock is optionnal and set to false by default.

Example :
{
// The transaction will be protected by the mutex
Wt::Dbo::Transaction transaction(m_session, true);
Wt::Dbo::Query<> queryRes = m_session.query<>("my_query");
[...]
}