How can I implement a thread-safe list wrapper in Delphi?
问题 I have a list wrapper that maintains two Tstringlists and a TClassList I need this to be thread safe, such that: Concurrent writes are not allowed (wait state of some sort should be entered) Reading while writing (or vice versa) is not allowed (wait state of some sort should be entered) Concurrent reads are allowed Any ideas on how I can do this? My instinct tells me it needs more than just a critical section, perhaps a semaphore or "usage counter", perhaps one of these in conjunction with a