But some alternatives for you: You could have a local collection containing
the list of deleted records which can only be modified while you own the mutex on lockmap.
So you could then just check the deleted record in that collection without ever going to the RAF
thread could slice out from here, so this record could be deleted by other thread then this thread read a deleted record!
While you should always try to avoid nested synchronization, sometimes it is not possible to avoid it totally. As long as you always nest in the same order you should be OK.