Hello friends, in that i had one problem : Let say there are 2 thread ReaderThread and WriterThread.and one vector which had some values. readerth reads from Vector and WriterTh writes into vector . before reading from vec. i put lock onto vect. and then i read the data from it.so taht no other will access this vect.and after read'g is ok i'll realeas the lock from vector.
code: for Lock is here:
but it wont proplerly. so can u pl. suggest somethins reg. to locking on to the Vector which will be shared by my 2 threads.