mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 02:45:22 +00:00
THRIFT-351. cpp: Allow a custom ThreadFactory in TThreadedServer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@754551 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e0a11c44ab
commit
45d56965c2
@ -106,6 +106,16 @@ TThreadedServer::TThreadedServer(shared_ptr<TProcessor> processor,
|
||||
threadFactory_ = shared_ptr<PosixThreadFactory>(new PosixThreadFactory());
|
||||
}
|
||||
|
||||
TThreadedServer::TThreadedServer(boost::shared_ptr<TProcessor> processor,
|
||||
boost::shared_ptr<TServerTransport> serverTransport,
|
||||
boost::shared_ptr<TTransportFactory> transportFactory,
|
||||
boost::shared_ptr<TProtocolFactory> protocolFactory,
|
||||
boost::shared_ptr<ThreadFactory> threadFactory):
|
||||
TServer(processor, serverTransport, transportFactory, protocolFactory),
|
||||
threadFactory_(threadFactory),
|
||||
stop_(false) {
|
||||
}
|
||||
|
||||
TThreadedServer::~TThreadedServer() {}
|
||||
|
||||
void TThreadedServer::serve() {
|
||||
|
@ -32,6 +32,12 @@ class TThreadedServer : public TServer {
|
||||
boost::shared_ptr<TTransportFactory> transportFactory,
|
||||
boost::shared_ptr<TProtocolFactory> protocolFactory);
|
||||
|
||||
TThreadedServer(boost::shared_ptr<TProcessor> processor,
|
||||
boost::shared_ptr<TServerTransport> serverTransport,
|
||||
boost::shared_ptr<TTransportFactory> transportFactory,
|
||||
boost::shared_ptr<TProtocolFactory> protocolFactory,
|
||||
boost::shared_ptr<ThreadFactory> threadFactory);
|
||||
|
||||
virtual ~TThreadedServer();
|
||||
|
||||
virtual void serve();
|
||||
|
Loading…
Reference in New Issue
Block a user