Hello! IMHO, WServer does not clone a WResource instance, passed to WServer::addResource(). You should provide thread-safe implementation of handleRequest().
On Tue, Mar 6, 2012 at 14:50, Ogden, Nick <nick.og...@usa.g4s.com> wrote: > Hi all, > > > > I’m currently attempting to use Wt to develop a web service that will > interface with an external process. > > > > I have deployed a message handler in the form of a WResource derived object > at a fixed URL using WServer::addResource() which performs message parsing > and the necessary communication with the external process. I am however, > concerned about concurrent request handling on this interface. > > > > Would I be correct in assuming that, for the resource deployed as above, > WResource::handleRequest() may be called concurrently on the same instance > (i.e. the one that I add with WServer::addResource()) and, as such, needs to > be thread-safe? Or is it that a new instance of the WResource is created per > concurrent request and that WResource::handleRequest() is only required to > be re-entrant? > > > > Note: I am assuming the Qt definitions of thread-safe and re-entrant: > http://qt-project.org/doc/qt-4.8/threads-reentrancy.html > > > > Kind Regards > > -- > > Nick Ogden > > Software Engineer > > G4S Technology Ltd. > > > > nick.og...@g4tec.com > > www.g4stechnology.com > > Challenge House, > > International Drive, > > Tewkesbury, > > Gloucestershire, > > GL20 8UQ, UK > > > > P Please consider the environment before printing this email > > > > > ________________________________ > The details of this company are as follows: > G4S Technology Limited, Registered Office: Challenge House, International > Drive, Tewkesbury, Gloucestershire GL20 8UQ, Registered in England No. > 2382338. > > This communication may contain information which is confidential, personal > and/or privileged. > > It is for the exclusive use of the intended recipient(s). > If you are not the intended recipient(s), please note that any distribution, > forwarding, copying or use of this communication or the information in it is > strictly prohibited. > > Any personal views expressed in this e-mail are those of the individual > sender and the company does not endorse or accept responsibility for them. > > Prior to taking any action based upon this e-mail message, you should seek > appropriate confirmation of its authenticity. > > This e-mail has been scanned for all viruses by MessageLabs. > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > witty-interest mailing list > witty-interest@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/witty-interest > ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ witty-interest mailing list witty-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/witty-interest