Quantcast
Channel: The Old New Thing
Viewing all articles
Browse latest Browse all 24428

re: IShellFolder::BindToObject is a high-traffic method; don't do any heavy lifting

$
0
0

I wonder if there's an AppVerifier Shim/Check to catch such violations. I can envision one - mark thread as "should return quickly" before entering BindToObject implementation, and fail the check if it calls any disk/network-hitting API during that time.

@Maurits: Nice. I guess the actual analogy would be:

Me: Do you guys sell mattresses?

Walmart guy: I'll check what we have...

Me: No need, I just...

Walmart: (Annoying hold music for 3 minutes, while the guy makes a complete inventory list of every mattress in stock and on display)

Walmart: Yes we do! Here's the complete list...

Me: No need, just wanted to know whether you generally do.

The solution to the "successful phone check but a failed in-store check" is an atomic resource lock: "If you have any, please reserve one for me". Of course, that is vulnerable to abandoned resources (I don't show up, item is reserved until timeout), DOS (100 people reserve and now Walmart can't sell any), DDOS (I advertise for people to call and DOS Walmart), etc.


Viewing all articles
Browse latest Browse all 24428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>