Scenario
-------------
I have a multithreaded DLL exposed through SWIG interface for TCL
application. The TCL application is a single threaded application by
default. The DLL launches multiple threads and tries to do some
processing.
Problem
------------
The application crashes with very little debug information available.
Question
-------------
Is it technically possible and correct to load a DLL that can launch
multiple threads through a TCL application that is essentially single
threaded?
Thank you in advance,
Suchit
Yes, if you do not pass "CRT objects" across the DLL boundary.
See:
http://msdn2.microsoft.com/en-us/library/ms235460(VS.80).aspx
best regards,
Randolf,
--
http://www.ayam3d.org/ Ayam, parametric NURBS modelling.
Yes with restrictions.
Some of which have been noted in other replies.
One big one is that you may only access the Tcl Interpreter and its data
structure from a single thread.
--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
Thank you Randolf for your quick response. I have begun investigating
and will post updates soon.
Suchit
Why not use a thread-safe version of Tcl, even though the app itself
doesn't create new threads ?
This way both ends of the DLL interface will use the same,
multithreaded, version of the C runtime...
-Alex