APARTMENTTHREADED vs MULTITHREADED - WeOnlyDo Discussion board

APARTMENTTHREADED vs MULTITHREADED (General questions)

by silverio, Wednesday, June 30, 2010, 10:21 (5259 days ago)

Hi,
I would like to know if there is some internal take care which force the use the wodVPN only in a APARTMENTTHREADED application.

I've a very complex service server at which a lot of telnet applications can connect. Each telnet connection (is a thread) gain a control of a VPN object. The VPN objects are normally created at server startup, stored in a threaded list and used only by a telnet thread a time. However a telnet thread can create new VPN objects in runtime (and store them in server program threaded list) so I neet to change the default threading model from APARTMENTTHREADED to MULTITHREADED, so in each telnet i don't need to call CoInitialize/CoUninitialize and overall the runtime created VPN controls don't disappear (destroy) when I close the telnet thread.

My program is so all synchronized and only a VPN method at time is used by a telnet thread and by only a thread at time. Unfortunately I don't know if change program threading model can break some internal VPN mechanism...


Complete thread: