I have some trouble finding the right design solution for a problem of sharing same critical section object between two classes in different class hierarchies.
e.g. EnterCriticalSection ( cs ); LeaveCriticalSection ( cs ); I want to create a functi开发者_StackOverflow社区on locking it and release if invoke your function call or leave the object.
Just want a little clarity on the this. Imagine I use the windows api of EnterCriticalSection.I call all of them with EnterCriticalSection(&criticalsection);
Is it safe to change VirtualTreeView data from the secondary thread ? And if yes, should I use critical sections (or even Synchronize method) ?
Here\'s the deal. My app has a lot of threads that do the same thing - read specific data from huge files(>2gb), parse the data and eventually write to that file.
I have about 50 web-sites, load-balanced across 5 web-servers. They all use Enterprise Library Caching, and access the same Caching database. The items in the Caching database are refreshed every few
As per my understan开发者_运维问答ding, when a process enters a critical section, no other process can simultaneously enter. But i see, by a program, that it is not.
I have more than 20000 CriticalSections need to delete when application close or serivce stop. But I found the DeleteCriticaSection function i开发者_如何学Cs very slow. I do a test:
i wrote 2 processes in order to satisfy mutual exclusion but om not sure if it is.. my initial flag value is 0.
I use to use critical section (in c++) to block theads execution whilel accessing shared data, but as to work them must need to wait unti开发者_如何学JAVAl data is not used before blocking, maybe it\'