Hello,
Great! it seems that PoolWindow makes it work correctly.
I run into a problem where available_handles (global) was destructed before PoolWindow (thread_local) (Valgrind told me).
available_handles[d_h.first].push_back(d_h.second); // SIGSEGV

I dont know how this can happen, I will try to reproduce.
Pascal