I have a multi-threaded program, with a shared hash data structure. One thread will add elements to the hash, and the other will occasinally delete them. I'm assuming adding an element is an 'atomic operation', but is deleting them 'atomic' as well? If neither is atomic, any suggestions on locking the data structure or element for the moment it is assigned/deleted?