Re: [OMPI devel] Removing from opal_hashtable while iterating over the elements

2016-11-18 Thread George Bosilca
Absolutely, if you keep the pointer to the previous or next element, it is safe to remove an element. If you are in the process of completely emptying the hashtable you can just keep removing the head element. George On Nov 18, 2016 6:51 AM, "Clement FOYER" wrote: > Hi

[OMPI devel] Removing from opal_hashtable while iterating over the elements

2016-11-18 Thread Clement FOYER
Hi everyone, I was wondering if it was possible to remove an element while iterating over the elements of a hashtable. As saw that it wasn't while using the OPAL_HASHTABLE_FOREACH macro, and I suppose it's because of the possible loss of the current next element. But how about if the element