Thank you for your reply, Mark. Is there a way to have per-thread data? For example, can I allocate a buffer for each thread in the threadpool? Otherwise, each thread needs to allocate/deallocate a buffer in the handler function for each request.
Thanks! --Michi On 11/5/10 4:16 PM, "Mark Slee" <[email protected]> wrote: > TThreadPoolServer is *not* thread-safe. The threads it creates are not > synchronized in any way. > > You must implement thread-safety yourself if you are sharing any data across > request handlers. > > -----Original Message----- > From: Michi Mutsuzaki [mailto:[email protected]] > Sent: Friday, November 05, 2010 3:52 PM > To: [email protected] > Subject: TThreadPoolServer thread safety > > Hi, > > I'm using TThreadPoolServer with C++. Does my handler need to be > thread-safe? More specifically, my handler has a static member, and I'm > wondering if I need to protect it using a mutex. > > Thanks! > --Michi > >
