[英]Thrift Concurrency: Unresolved externals
I'm attemtping to upgrade our thrift simple server to a nonblocking server. 我打算将我们的节俭型简单服务器升级为非阻塞服务器。 In order to do so, I had to link the thriftnb lib.
为此,我必须链接thriftnb lib。 Linking the nb lib fixed unresolved external errors related to the nonblocking server;
链接nb lib修复了与非阻塞服务器有关的未解决的外部错误; however, I am still getting unresolved externals for the thread factories... eg... posix or boost thread factory.
但是,我仍然无法获得线程工厂的外部组件,例如posix或boost线程工厂。 I would assume thrift concurrency also lives in the nb lib (or the general thrift lib).
我认为节俭并发也存在于nb库(或普通节俭库)中。 As far as I can tell, there are only two thrift libs, so what am I missing?
据我所知,只有两个节俭库,那么我还缺少什么呢?
Thanks! 谢谢!
thrift 0.11 C++ 11 节俭0.11 C ++ 11
I'm still not sure why the boost and posix thread factories are missing, but the StdThreadFactory is working. 我仍然不确定为什么缺少boost和posix线程工厂,但是StdThreadFactory正在运行。 For anyone that is interested, this is my config:
对于任何有兴趣的人,这是我的配置:
std::shared_ptr<apache::thrift::protocol::TProtocolFactory> protocolFactory(new apache::thrift::protocol::TBinaryProtocolFactory());
std::shared_ptr<apache::thrift::transport::TProcessor> processor(new cimnetservicerefactor::CIMNetServiceRefactorProcessor(stdHandler));
std::shared_ptr<apache::thrift::TProcessorFactory> processorFactory(new apache::thrift::TSingletonProcessorFactory(processor));
std::shared_ptr<apache::thrift::transport::TNonblockingServerTransport> serverTransport(new LocalhostOnlyServerSocket(port, machineName, localConnectionsOnly));
shared_ptr<apache::thrift::concurrency::StdThreadFactory> threadFactory = shared_ptr<apache::thrift::concurrency::StdThreadFactory>(new apache::thrift::concurrency::StdThreadFactory());
threadManager->threadFactory(threadFactory);
threadManager->start();
apache::thrift::server::TNonblockingServer server(processorFactory, protocolFactory, serverTransport, threadManager);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.