max0x7ba / atomic_queue

C++ lockless queue.
MIT License
1.47k stars 176 forks source link

Add allocator accepting constructor / fix pthreads on windows / add cmake support #60

Closed RedSkittleFox closed 7 months ago

RedSkittleFox commented 7 months ago
max0x7ba commented 7 months ago

Thank you for your massive contribution.

I'd rather you split your changes into 3 separate pull requests for ease of reviewing and merging:

  1. CMake support. These can probably be merged with little changes. I am not a CMake user to be able to assess it by just eyeballing, will have to test drive your changes.
  2. Windows compatibility changes. It should rather detect unavailability of pthread.h on Windows only, or just not include it at all when compiled on Windows. Platforms providing pthread.h shouldn't require any new preprocessor magic to maintain present behaviour.
  3. Stateful allocators. That is something I'd need to review most thoughtfully.

Thank you.

RedSkittleFox commented 7 months ago

Split to 61 and 62 for now. Windows fix has to wait for 61 to be merged. https://github.com/max0x7ba/atomic_queue/pull/61 https://github.com/max0x7ba/atomic_queue/pull/62