Re: [Cppcms-users] singleton per thread
Brought to you by:
artyom-beilis
From: Artyom <art...@ya...> - 2010-09-28 21:05:45
|
Store it as member of your applications, application instances are cached. You can also use booster::thread_specific_ptr See as example wikipp. Artyom P.S.: Soci has connection pool as well. ----- Original Message ---- > From: Daniel Vallejos <chi...@gm...> > To: cpp...@li... > Sent: Tue, September 28, 2010 7:44:14 PM > Subject: [Cppcms-users] singleton per thread > > Hello. > > I use soci for database access. > > The soci session object is not "thread safe". > > AFAIK each cppcms::application object runs in a thread. > > Then I need a "singleton per thread" or "thread local storage". > > How to accomplish this with cppcms? > > I try to use "boost::thread_specific_ptr" with no luck (segmentation > fault). > > > Thanks. > > > > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |