I have a list wrapper that maintains two Tstringlists and a TClassList
I need this to be thread safe, such that:
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 CS.
I'm just not quite sure where to start - anything from an overall approach in english to psuedo-code, to delphi implementation or external link would be much appreciated.
You should have a look at the TMultiReadExclusiveWriteSynchronizer class declared in sysutils.pas...