On Freitag 06 Februar 2009 12:21:13 lin wrote: > Hi, all > > there a thread safe problem to scope variable: > for example: > > <%session > int a > /%session> > > allocate a integer, and put it in session scope, but when a request is > touching it, another thread would delete it, and free the momery, so > cause Segmentfault. > > modified version define a SmartPtr to hold the reference, to avoid it to > be recovery. > > lin Hi,
normally I would like to see a testcase but of course it is difficult to reproduce a concurrency problem. Did you see a real case or just read code? The session scope is guaranteed to be locked as soon as a request sees the variable, so it can't happen, that 2 threads are accessing the same session. And the only thread, which may delete the pointer is the cleaner thread anyway and this helds the big session lock. If you had a crash or maybe even can reproduce it, it might well be a bug in tntnet, we must fix. Tommi ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ Tntnet-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tntnet-general
