quiz
quiz copied to clipboard
The main refactoring
Another idea is to make read-write lock in the FileWithContent. It should be possible to read a file by multiple threads while it is not saving and save while it’s not reading or saving.
Try to spend 15 minutes maximum for the entire work. If you need more time, you're doing something wrong. Remember, you have to do just the first step in refactoring. Don't fix everything.
Sorry. For me it was easier to fix than write.