> On 2011-06-16 12:56:46, Alan Conway wrote: > > /trunk/qpid/cpp/src/qpid/sys/windows/Thread.cpp, line 85 > > <https://reviews.apache.org/r/904/diff/1/?file=21139#file21139line85> > > > > Why the pointer? Just declare > > > > std::map<unsigned, ThreadPrivate::shared_ptr> pQpidThreads; > > > > and let std::map take care of the memory management. > > Andrew Stitcher wrote: > I'd also add that we don't use the hungarian variable notation either so > the 'p' should be stripped (possibly from other places too)
OK... this was previously invisible because I missed the <Publish> step :-( The intended logic was that Thread::current() should have defined behavior, even if called from a static destructor. Otherwise, you need a way to guarantee the std:map destructor is never called too soon. The original JIRA's deadlock was in the context of a static destructor calling Thread::join(). On re-examiniation, the use of a non-POD lock mechanism is inconsistent with the stated goal. Thank-you for the heads up. I will work with Steve to address this and the naming problem. I have a fixed version I will upload to a separate review... coming soon. - Cliff ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/904/#review849 ----------------------------------------------------------- On 2011-06-15 01:08:18, Steve Huston wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/904/ > ----------------------------------------------------------- > > (Updated 2011-06-15 01:08:18) > > > Review request for qpid. > > > Summary > ------- > > Keeps track of Qpid runnable threads and other threads, ensuring that rundown > doesn't deadlock. > > > This addresses bug QPID-3256. > https://issues.apache.org/jira/browse/QPID-3256 > > > Diffs > ----- > > /trunk/qpid/cpp/src/qpid/sys/windows/Thread.cpp 1132733 > > Diff: https://reviews.apache.org/r/904/diff > > > Testing > ------- > > Qpid regression test suite. > > > Thanks, > > Steve > >
