Instead of opening up a new file handle in every function, we could open one single handle at the beginning of the program and pass it around to every function that needs it. This is a trade-off—we get more performance if we don't repeatedly lock and unlock a file. In turn, we disallow other processes to access our file while our program is running.




















































