4

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.

Haris
  • 12,120
  • 6
  • 43
  • 70
b0ti
  • 2,319
  • 1
  • 18
  • 18
  • Strange library that does not supply threadsafe pools. I would have thought that any cross-platform library would provide some link to an OS_specific synchro library that provides those primitives available on any OS, (mutex, semaphore), so that common thread-safe utilities like queues and pools could be built. – Martin James Feb 10 '12 at 09:36
  • 1
    There is mutex support in apr. – b0ti Feb 10 '12 at 12:57

0 Answers0