scotty and multi-threading

clau@plaintree.com
Thu, 13 Mar 97 16:38:35 est

Has anyone tried using scotty in a multithreaded program on Windows?
Here is what I'm trying to do under Windows without much luck:

- I have a Win32 application that spawn off new threads whenever there
are chuncks of SNMP operations to do. Each new thread would create
its own interpreter by calling Tcl_CreateInterp() and Tcl_Init().

- The loading of the Tnm DLL is done only once in TCL's init.tcl. I
put the following two lines in TCL's init.tcl:

package require Tnm
snmp session # so that all the mibs get loaded up front

- So far so good. I can spawn off a new thread and make snmp request.
But as soon as two threads try to make snmp request at the same time
(each thread is in its own interpreter and and using its own snmp
session), one of them dies. The other one would finish but then I
couldn't make any more snmp request in any thread.

I believe there must be some global variables in that the snmp request
is relying on. Any pointers will be greatly appreciated.

clau@plaintree.com
Carmel Lau's personal words.

--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.