Re: [Cppcms-users] threading considerations when accessing session data from json-rpc
Brought to you by:
artyom-beilis
From: Leon <le...@wl...> - 2012-03-01 01:37:23
|
Thanks! I am much clearer now. On Wed, Feb 29, 2012 at 6:43 PM, Artyom Beilis <art...@ya...> wrote: > > > ----- Original Message ----- > >> From: Leon <le...@wl...> >> >> >> Hi, >> I am still not very clear about cppcms' threading model. Am I correct >> that each json-rpc method will be run from a thread from the thread >> pool? Do this mean that >> each access to any session data should be protected by mutex? >> >> >> Thanks! > > The session is accessed via cppcms::http::context and the context > is request/response specific. So unless you access one context from > two threads (which I don't see a reason to do) it is safe. > > The session storage thread safety is handled by CppCMS, > depending in specific backend and transparent to you. > > Of course if you implement your own session storage you should deal > with it on your own, but as I understand you don't. :-) > > > Artyom Beilis > ------------- > > Support CppCMS by donating money: > https://sourceforge.net/donate/index.php?group_id=209965 > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |