ignore me, I didn't even pay attention to which threads are being joined etc
On Tue, Mar 25, 2014 at 11:48 AM, Nevo Hed <[email protected]> wrote: > Never used this class nor look at trace but I think join is called already > from serve (so you should not call it again) > > > // If stopped manually, join the existing threads > > > if (stop_) { > try { > serverTransport_->close(); > threadManager_->join(); > } catch (TException &tx) { > string errStr = string("TThreadPoolServer: Exception shutting down: > ") + tx.what(); > GlobalOutput(errStr.c_str()); > > > > > > > On Mon, Mar 24, 2014 at 4:38 PM, Lars Benner <[email protected]> wrote: > >> Hi, >> >> I am having a problem, while shutting down a multithreaded thrift >> session. Basically I am setting up a TThreadPoolServer with a TPipeServer. >> Therefore, I call in a separate thread, the serve function of >> TThreadPoolServer: >> >> void run() >> { >> ... >> >> d->pServer->serve(); >> } >> >> For shutting down the server, this is done: >> >> void shutdown() >> { >> d->pServer->stop(); >> >> d->serverThread.join(); >> } >> >> If I debug the shutdown function, stepping in or over the stop call works >> without a problem. But while waiting for the thread to terminate I get an >> unhandled exception: >> >> "Unhandled exception at ...: Access violation reading location >> 0xffffffff." >> >> I figured out that exceptions are used for closing the connection. It >> actually looks like, that the Visual Studio debugger is able to catch the >> exception as intended, but if I tried to do the next step, I see the >> exception above. >> >> Has anybody observed a similar issue or has an idea what is going wrong? >> >> Please let me additionally note that everything else is working great, >> including several thousand calls from the client to the server. >> >> You might want also some additional information: >> >> Thrift version: 0.9.1 >> Visual Studio 2008 >> Boost version: 1.54.0 >> >> Thanks, >> - Lars >> >> >> LARS BENNER / SENIOR SOFTWARE ENGINEER >> phone: +49 (0)89 32175 593 / e-mail: [email protected] / >> www.tomtec.de..................................................................................... >> TOMTEC IMAGING SYSTEMS GMBH >> Edisonstr. 6 / 85716 Unterschleissheim / Germany >> fax: +49(0)89 32175 750 | phone: +49(0)89 32175 500 >> HRB 91397 Amtsgericht Muenchen / Geschäftsführer: Ulrich R. Haupt, >> Johannes Waldinger >> ..................................................................................... >> >> Wichtiger Hinweis: Diese E-Mail und etwaige Anlagen können Betriebs- oder >> Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. >> Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen der Status >> dieser E-Mail bekannt. Bitte benachrichtigen Sie uns in diesem Fall sofort >> durch Antwort-Mail und löschen Sie diese E-Mail nebst etwaigen Anlagen von >> Ihrem System. Ebenso dürfen Sie diese E-Mail oder ihre Anlagen nicht >> kopieren oder an Dritte weitergeben. Vielen Dank! >> >> Important Note: This e-mail and any attachment are confidential and may >> contain trade secrets or otherwise protected from disclosure. If you have >> received it in error, you are on notice of its status. Please notify us >> immediately by reply e-mail and then delete this e-mail and any attachment >> from your system. If you are not the intended recipient please understand >> that you must not copy this e-mail or any attachment or disclose the >> contents to any other person. Thanks. >> >> >> >
