<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2604" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Great, Brian. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I successfully reproduced the state with a very 
simple application. Here is very dumb python program that uses the 
CLR:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>from CLR.System import String</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>class cSharpCaller( object ):<BR>&nbsp;&nbsp;&nbsp; 
def __init__( self ):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print 
"Created a cSharpCaller instance"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
self.__cSharpString = None</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; def createCSharpString( self, 
str ):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.__cSharpString = 
String( str )</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; def returnCSharpString( self 
):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 
self.__cSharpString.ToString()<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>And if I test this with this (dumb) threethreaded 
testprogram:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>import threading, thread, time</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>from cSharpCaller import cSharpCaller </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>def start_threads(amount=5):<BR>&nbsp;&nbsp;&nbsp; 
for i in range(amount):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
thread = threading.Thread(target=process_thread 
)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print "starting thread ", 
thread.getName()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
thread.start()</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>def process_thread(&nbsp; ):<BR>&nbsp;&nbsp;&nbsp; 
print "thread&nbsp; started "<BR>&nbsp;&nbsp;&nbsp; for i in range( 2 
):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print "Hi, I'm a 
thread"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; time.sleep( 1 
)<BR>&nbsp;&nbsp;&nbsp; cs = cSharpCaller( )<BR>&nbsp;&nbsp;&nbsp; 
cs.createCSharpString( "created from a thread" )<BR>&nbsp;&nbsp;&nbsp; print 
"cs.returnCSharpString() = ", cs.returnCSharpString()<BR>&nbsp;&nbsp;&nbsp; 
print "thread %s ended"</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>start_threads( 3 )</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I get this output:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>starting thread&nbsp; thread0<BR>thread&nbsp; 
started<BR>Hi, I'm thread %s<BR>starting thread&nbsp; thread1<BR>thread&nbsp; 
started<BR>Hi, I'm thread %s<BR>starting thread&nbsp; thread2<BR>thread&nbsp; 
started<BR>Hi, I'm thread %s<BR>Hi, I'm thread %s<BR>Hi, I'm thread %s<BR>Hi, 
I'm thread %s<BR>Created a cSharpCaller instance<BR>Created a cSharpCaller 
instance<BR>cs.returnCSharpString() =</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>and I have to CTRL+Pause to get out of the hang. 
Clearly hangs on the first String.ToString() method call. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Regards, </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Torgeir</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;</DIV></FONT></BODY></HTML>