使用apache运行时库时的apr_pool线程安全

发布于 2025-01-04 11:40:09 字数 306 浏览 3 评论 0原文

APR API 中的文件和套接字依赖于池,我认为不使用 apr_pools 就无法创建套接字/文件。问题是 apr_pools 不是线程安全的,因此在一个线程中创建套接字并在另一个线程中销毁它是有问题的。 你是如何在多线程程序中解决这个问题的?

我已经问过这个问题 在 apr 邮件列表上,但没有回复。

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文