Hi I’m currently learning about SDL mutex.
I learned I need to lock process when thread is reading and another one is writing at the same time and also, writing and writing at the same time
But, I think I don’t need to lock while reading and reading
I do this when thread is either reading or writing.
SDL_LockMutex(lock); //SomeCriticalSection SDL_UnlockMutex(lock);
But, though this method, other threads can’t access to CriticalSection as read
while another thread is reading.
What do I do for this?
Are there any methods like Lockmutex as read?
I don’t understand Semaphore and Cond sorry.