Subj : Re: Question for mr lockfree :) To : comp.programming.threads From : Chris Thomasson Date : Wed May 18 2005 12:28 am >> For the time being, it is. I have yet to find a "proper" way to reliably >> grow the number of per-thread hazard pointers without stopping the >> world.. > > It could be done but I don't think it should be done if it adds an extra > level > of indirection. I did an implementation that allows for any number of hazard pointers per-thread, but it needed an extra memory barrier for the bit of extra state that needed to be scanned by the polling thread. It used per-thread hash-tables instead of hazard pointers. It hashed the pointer that needed to be protected into an index of a per-thread table and incremented the corresponding counter. This allows for a single hazard to protect multiple objects. I guess I should call the algorithm hazard proxies instead of hazard pointers. > I don't think you need more than one hazard pointer per > thread unless you do some kind of lock-free recursive traversal of a tree > or > something. This is exactly why I implemented it. > You can always handle it as an error equivalent to stack overflow. Yes, that would make it a lot easier. :) .