R
RobbKirk
Guest
Hello Fellas,
How to define the current state of that Handle?
Say when I apply QuickView? Set or Reset?
Well asking WaitOne() will result yo true or false
But is it the same TRUE/FALSE that was during initialization?
ManualResetEvent Waitor = new ManualResetEvent(false);
========================================
I decided to extend my Q.
Actually I use that handle inside some Thread as its internal element.
I can't make it as static and volatile, but I suppose when I set it from outside using internal Lambda code, it doesn't want to be set..
Seems like the same situation why volatile has been issued as part of declaration.
So, I would ask now more focused: how to emulate volatile feature of a field but inside a Thread?
SomeThread() {
volatile bool IsTrue = false;
// Now I am sure there is only one copy of that data
// inside the Thread compartment
while(!IsTrue) {
// Working hard here
}
}
Thakns
"I = I + 1" .. Isn't it boolshit?
Continue reading...
How to define the current state of that Handle?
Say when I apply QuickView? Set or Reset?
Well asking WaitOne() will result yo true or false
But is it the same TRUE/FALSE that was during initialization?
ManualResetEvent Waitor = new ManualResetEvent(false);
========================================
I decided to extend my Q.
Actually I use that handle inside some Thread as its internal element.
I can't make it as static and volatile, but I suppose when I set it from outside using internal Lambda code, it doesn't want to be set..
Seems like the same situation why volatile has been issued as part of declaration.
So, I would ask now more focused: how to emulate volatile feature of a field but inside a Thread?
SomeThread() {
volatile bool IsTrue = false;
// Now I am sure there is only one copy of that data
// inside the Thread compartment
while(!IsTrue) {
// Working hard here
}
}
Thakns
"I = I + 1" .. Isn't it boolshit?
Continue reading...