Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is FindFirst,FindNext & FindClose Thread safe in delphi

Tags:

delphi

Is FindFirst,FindNext & FindClose Thread safe in delphi ? If not what should be used in there place ?

like image 281
Charles Faiga Avatar asked Oct 22 '09 09:10

Charles Faiga


2 Answers

FindFirst, FindNext & FindClose use API calls and they are Thread safe. Every thread must use its own API handle for file access.

like image 179
GJ. Avatar answered Sep 30 '22 14:09

GJ.


If you don't use a shared TSearchRec variable the routines are thread safe.

like image 32
Tihauan Avatar answered Sep 30 '22 13:09

Tihauan