This may be an appropriate use for EnterCriticalSection and ExitCriticalSection, although why don't you just use a different "prefix" in the call to GetTempFile for each thread.

On 25/11/15 13:51, Aradeonas wrote:
Hi,
I used GetTempFileName in a multi thread system and it causes problems as you guess already. So the best way in my mind is using GUID and maybe use it in a loop for checking not existing for extra safety. But I want to know is there any clean implementation already that I dont know of?
Regards,
Ara
--
http://www.fastmail.com - The way an email service should be


--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to