BOOST ASIO IO_Service 和 Socket
为了实现数据局部性,我在多处理器系统上的每个处理器上运行一个 io_service 线程。我希望始终从运行 io_service
且与我的执行核心相邻的线程发送数据并读取数据。但我发现套接字与 io_service 具有一对一的关系,并且 io_service 与线程具有一对一的关系。有没有一种方法可以在创建一个套接字后将其分配给不同的 io_service ?
In order to achieve data locality, i am running an io_service
thread per processor on a multi-processor system. I want to always send the data and read the data from the thread running io_service
and adjacent to my execution core. But i find that the socket has a one-on-one relationship with the io_service
and io_service
has a one-on-one relationship with a thread. Is there a way i can assign one socket to a different io_service
, after it was created?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论