V
V
Vladimir Grabko2016-09-14 20:00:51
go
Vladimir Grabko, 2016-09-14 20:00:51

Is it possible to block 1 key instead of the whole card?

I have a map (a couple of million keys, constant accesses). Also there is a kind of garbage collector that checks the time of the last use of the key and if it deletes it. After these manipulations, the recalculation of data in this map is started (a normal cycle). This case every 5 seconds 1 second is not available (and this is very bad). Now I'm thinking of somehow blocking not the entire map, but 1 key. Only here's how it no longer googles even.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
evnuh, 2016-09-14
@VGrabko

I have a feeling of deja vu on this question. and not in vain, I already answered it for you:
Thread safety and pointers. Need blocking?
And yet, in Russian they do not say "map" in relation to the map data structure.
You have already asked more than 100 questions, the answer to 95% of them is googled for no longer than five seconds. Maybe you google in Russian and not in English, since you have all the time "Only this is how it doesn't google even."

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question