I need to acess one variable of main thread from a secondary thread . I guess it requires some kind of syncronisation. i think for Rsemaphore. But i am never before use this.
can any one give some sample code snippet or any exp or link to understand how to use a simple semaphore properly.