gcpp icon indicating copy to clipboard operation
gcpp copied to clipboard

Multithreaded

Open ghost opened this issue 8 years ago • 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.

ghost avatar Dec 17 '16 20:12 ghost

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.

hsutter avatar Jan 17 '17 01:01 hsutter