I've encountered a problem while using interacting threads in WTestEnviroment.
The problem my be summarized in the following code.
It seems that the update lock of an application living in WTestEnvironment may
not be taken by threads different from the environment's one.
Any suggestion?
Thanks in advance,
Francesco
#include <boost/thread.hpp>
#include <Wt/Test/WTestEnvironment>
#include <Wt/WApplication>
class Updater {
public:
Updater(Wt::WApplication* aApplication)
: theApplication(aApplication) {}
void operator()() {
Wt::WApplication::UpdateLock myLock(theApplication);
}
private:
Wt::WApplication* const theApplication;
};
int main() {
const Wt::Test::WTestEnvironment myEnvironment;
Wt::WApplication myApplication(myEnvironment);
Updater myUpdater(&myApplication);
boost::thread myThread(myUpdater);
myThread.join();
}
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest