Re: APARTMENTTHREADED vs MULTITHREADED (General questions)
wodVPN is thread safe, but you need to have it in apartment threaded.Which means that the component has to be used from the same thread that it was instantiated from.
Uhm, thread safe, this is a good news.
I've leaved the MTE envirorment for the STE (many changes to my code).
At this point however all wodVPN objects are created and stored in a TThreadList by main program thread and used each one by a only TIdTCPServer connection thread (TIdPeerThread). This break what you wrote upon the component has to be used from the same thread that it was instantiated from but I hope this don't generate any fault in the system. If the using thread MUST to be the only creating wodVPN object thread I will need to change again my code.
Unfortunately I'm very bad in OLE/COM knowledge so my project draft suffer of missing knowledge about this matter :(
Cross my fingers...
Complete thread:
- APARTMENTTHREADED vs MULTITHREADED - silverio, 2010-06-30, 10:21
- Re: APARTMENTTHREADED vs MULTITHREADED - Silverio, 2010-06-30, 17:21
- Re: APARTMENTTHREADED vs MULTITHREADED - woddrazen, 2010-06-30, 19:19
- Re: APARTMENTTHREADED vs MULTITHREADED - Silverio, 2010-07-01, 15:04
- Re: APARTMENTTHREADED vs MULTITHREADED - woddrazen, 2010-06-30, 19:19
- Re: APARTMENTTHREADED vs MULTITHREADED - Silverio, 2010-06-30, 17:21