Title: RE: [msvc] Best way of accessing functions..

>   I have a global class that gets used with events from iexplorer,
> which works fine. But I have one of the functions called within the
> same global class during the OnTimer(..) which resets some of the
> variables. What is the best way of making sure that the variables are
> not getting modified by the two parts of the application? I tried
> using CCriticalSection, but didnt work, then realised it protects
> the sections from different threads.
>
> Anyone any ideas the best way of doing this?

You seem not to want to protect the variable from access by several
threads.  If this is true, then the variables are already safe, because
if they're only accessed by one single thread, you don't need any
synchronization.

I'm puzzled in what you mean by 'parts' of application, if you're not
talking of threads, though.

-------------
Ehsan Akhgari

List Owner: [EMAIL PROTECTED]

[ Email: [EMAIL PROTECTED]; [EMAIL PROTECTED] ]
[ WWW: http://www.beginthread.com/Ehsan ]

Whoever fights monsters should see to it that in the process he does not
become a monster. And when you look long into the abyss, the abyss also
looks into you. -Beyond Good And Evil, F. W. Nietzsche

Reply via email to