Hi,

I have a question regarding insert_check and insert_commit on an intrusive set.

I know that you must call insert_commit after calling insert_check, with no modifications to the set between the two calls.

Is it OK, however, to call insert_check and then never call insert_commit (even though insert_check was successful)?

Say I have objects contained in multiple sets (using multiple hooks).  I want to insert a new object into each of the sets, but only if I know that the insert will succeed on all of the sets.   I call insert_check on each, and if all succeed I call insert_commit on each.  If any of the insert_check calls fail, I do none of the insert_commits (even though all but one might have worked)

It seems like it should be OK, and the documentation doesn't say that it won't work.  I'm only concerned for two related reasons:

1) insert_check is not declared const.  Does this mean that the set is already partially modified?

2) insert_commit is documented as constant time.  Does this mean that any red-black rebalancing was already done during insert_check?  If so, what happens if I never do the insert_commit?

Thanks!
Paul Rose