Asynchronous append to .txt file in delphi
问题 I'm trying to run a mail server and I want to keep track of the events like login, connect etc.. and I want to save this data in a log .txt file. But since it has to be done asynchronously I don't know how to lock the file for the current data append and then release it for next use. So basically I'm asking for help for a procedure called asyncAppendToFile(fileName : String; textToAppend : String) procedure SMTPServerUserLogin(ASender: TIdSMTPServerContext; const AUsername, APassword: String;