使用apache运行时库时的apr_pool线程安全
APR API 中的文件和套接字依赖于池,我认为不使用 apr_pools 就无法创建套接字/文件。问题是 apr_pools 不是线程安全的,因此在一个线程中创建套接字并在另一个线程中销毁它是有问题的。 你是如何在多线程程序中解决这个问题的?
Files and sockets in the APR API rely on pools, I see no way to create sockets/files without the use of apr_pools
. Problem is that apr_pools are not thread-safe, thus creating a socket in one thread and destroying it in another is problematic.
How did you solve this problem in your multi threaded program?
I have already asked this question on the apr mailing list, but there was no answer.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论