Do you have a question ?
Quote:
I had created two threads for two methods filewritting and filereading. By using synchronization only one thread should access either filewritting or filereading.
By ensuring both threads are mutually exclusive, you defeat the purpose of threads. What is the interest ?
just making 2 sub-programs and calling them in turn would do the job.