Which thread do the process first if we use multithreading ?
I have a common doubt. :confused:
If we use two synchronized threads simultaneously for reading and writing for a database, which thread will access first.
We have two synchronized threads
Thread 1 for reading a database.
Thread 2 for writing to the same database.
If these two threads tries to do their process simultaneously which thread will access first the database (Read or write will happen first) ??
How to decide it ?? :confused:
Thanks a lot ..........