hsutter/gcpp

Multithreaded

Opened this issue · 1 comments

Hi! The gcpp is very interesting, but I'm failing to realize how it's supposed to work in multithreaded program. Especially the part that registers deferred_ptr objects and resets them in the heap destructor.

For example, would it be possible to demand no external reference exist at the end of heap's lifetime instead? If heap destructor would detect such a reference after destroying all the objects (checking remaining refcounters), it would call std::terminate.

Thanks for this suggestion. The current implementation is single-threaded; see the readme for notes about adding concurrency support.

For now I'm waiting for feedback and bug reports from actual use of the library, and deferring enhancements and optimizations until then but keeping them in the backlog.