thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Łukasz Michalik <>
Subject Re: stop() method?
Date Mon, 25 Oct 2010 08:19:04 GMT

You are running C++ in a pthread environment, I would presume from
that snippet.  Therefore you need to use pthread_sigmask(3) and
sigwait(3) in the same thread, call server.stop() and serve() will
return.  Usual signal(2) approach in not specified for multithread

On 01:21 2010-10-23 -0400, Richard Salz wrote:
> When a server is in its "serve" loop:
>         server.serve()
>         printf("Exiting..\n");
> What't the right way to make that stop and return so the printf happens? I 
> thought having having SIGTERM call server.stop(), but apparently not. What 
> should I do?

Łukasz P. Michalik

View raw message