Delphi Midas Thread Model (1) Single Represents The generated in-Process COM program is a single thread program, which can only receive a client sent request, because it is a loop operation, so there will be no multitasking at the same time Question, your COM program does not need to write more
The part of the processing. (2) Apartment represents the instance generated by each Remote Data Module that can only handle the Request to be issued at a time, but if you create multiple In-Process COM programs, each COM program has a thread. To handle, the data processed by each instance is safe, but you must prevent some conflicts of shared variables. (3) Free This thread mode allows the Remote Data Module generated by each instance to handle each foreground through its respective threads Request, so Remote Data Moudle itself must use multi-threaded program to write, you must protect the data area handled by each instance will not conflict with each other .. When using ADO data set, it is recommended to use the Free model. (4) Both with Free, in addition to all Callback corresponding to the front interface is continuous. (5) NEUTRAL This mode allows multiple front programs to call Remote Data Module at the same time at different threads, but the COM object must ensure that there will be no front desk. The conflict of program calls, you want to determine that each thread is accessing global variables and instance data,
Any conflict will occur. This mode is only available in COM .