RE: Question

"Jack Jin" <[email protected]> Mon, 30 Jun 2003 09:41:40 -0400
Newsgroups gmane.ietf.sfl
Message-ID <[email protected]>
This is a multi-part message in MIME format.

------=_NextPart_000_0004_01C33EEB.CED491E0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hi, William:

Well,  the SFL libraries don't allow to pass instances between threads. Does
this  means if I want to use SFL objects in different threads I have to
create CSM_AppLogin  object in each thread,  then create other objects ?

thanks

Jack Jin


-----Original Message-----
From: William Adams [mailto:[email protected]]
Sent: Monday, June 30, 2003 4:38 AM
To: 'Jack Jin'
Cc: 'imc-sfl'
Subject: RE: Question


The SFL libraries do not by default allow you to pass instances between
threads. You can compile the libraries with SM_NO_THREADS defined this will
mean there is no thread locking. Of course it also means the libraries wont
be thread safe and you will have to ensure that your code is thread safe.

Hope this helps.


William Adams
Software Engineer
Nexor
Tel: +44 (0) 115 952 0500
Fax: +44 (0) 115 952 0519
DD: +44 (0) 115 953 5536
Mailto:[email protected]
http://www.nexor.com

Nexor is recognised as an Investor in People and is accredited to ISO
9001/TickIT and IS BS7799. Further details of Nexor's accreditations can be
found on our website.


DISCLAIMER: Privileged or confidential information may be contained in this
message or within any files transmitted with it. If you are not the intended
recipient, kindly destroy the message and notify the sender by reply email.
Opinions, conclusions and other information in this message that do not
relate to the official business of Nexor are neither given nor endorsed by
it.


-----Original Message-----
From: [email protected] [mailto:[email protected]]On
Behalf Of Jack Jin
Sent: 27 June 2003 20:13
To: imc-cml
Subject: Question


Hi,

I using SFL v2.1. I got a problem.

I initilize class CSM_AppLogin with "sm_free3DLL" library in the main thread
.  I pass the pointer of CSM_AppLogin object  to another thread created by
main thread.  In that thread I try to create CSM_MsgToSign object to sign
data, but the thread blocked. If I use CSM_AppLogin and CSM_MsgToSign  in
same thread, it didn't blocked and works fine.

Thanks for the help.


Jack Jin
Software Developer
Edisoft Inc




------=_NextPart_000_0004_01C33EEB.CED491E0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR></HEAD>
<BODY style=3D"COLOR: #000000; FONT-FAMILY: Arial">
<DIV><SPAN class=3D788092913-30062003><FONT size=3D2>Hi,=20
William:</FONT></SPAN></DIV>
<DIV><SPAN class=3D788092913-30062003><FONT =
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D788092913-30062003><FONT size=3D2>Well,&nbsp; the SFL =
libraries=20
don't allow to pass instances between threads.&nbsp;Does this =
&nbsp;means if I=20
want to use SFL objects&nbsp;in different threads I have to&nbsp;create=20
CSM_AppLogin&nbsp; object in&nbsp;each thread, &nbsp;then create other =
objects=20
?</FONT></SPAN></DIV>
<DIV><SPAN class=3D788092913-30062003><FONT =
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D788092913-30062003><FONT =
size=3D2>thanks</FONT></SPAN></DIV>
<DIV><SPAN class=3D788092913-30062003></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D788092913-30062003><FONT size=3D2>Jack =
Jin</FONT></SPAN></DIV>
<DIV><SPAN class=3D788092913-30062003></SPAN><SPAN=20
class=3D788092913-30062003></SPAN><SPAN =
class=3D788092913-30062003></SPAN><FONT=20
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
size=3D2>-----Original Message-----<BR><B>From:</B> William Adams=20
[mailto:[email protected]]<BR><B>Sent:</B> Monday, June 30, 2003 =
4:38=20
AM<BR><B>To:</B> 'Jack Jin'<BR><B>Cc:</B> 'imc-sfl'<BR><B>Subject:</B> =
RE:=20
Question<BR><BR></FONT></DIV>
<DIV><SPAN class=3D257243408-30062003><FONT size=3D2>The SFL libraries =
do not by=20
default allow you to pass instances between threads. You can compile the =

libraries with SM_NO_THREADS defined this will mean there is no thread =
locking.=20
Of course it also means the libraries wont be thread safe and you will =
have to=20
ensure that your code is thread safe.</FONT></SPAN></DIV>
<DIV><SPAN class=3D257243408-30062003><FONT =
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D257243408-30062003><FONT size=3D2>Hope this =
helps.</FONT><BR><BR>
<P><FONT size=3D2>William Adams<BR>Software Engineer<BR>Nexor<BR>Tel: =
+44 (0) 115=20
952 0500<BR>Fax: +44 (0) 115 952 0519<BR>DD: +44 (0) 115 953 5536<BR><A=20
href=3D"mailto:[email protected]">Mailto:[email protected]</A><BR><=
A=20
href=3D"http://www.nexor.com/" =
target=3D_blank>http://www.nexor.com</A><BR><BR>Nexor=20
is recognised as an Investor in People and is accredited to ISO =
9001/TickIT and=20
IS BS7799. Further details of Nexor's accreditations can be found on our =

website.<BR><BR><BR>DISCLAIMER: Privileged or confidential information =
may be=20
contained in this message or within any files transmitted with it. If =
you are=20
not the intended recipient, kindly destroy the message and notify the =
sender by=20
reply email. Opinions, conclusions and other information in this message =
that do=20
not relate to the official business of Nexor are neither given nor =
endorsed by=20
it.<BR></FONT></P></SPAN></DIV>
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
size=3D2>-----Original Message-----<BR><B>From:</B> =
[email protected]=20
[mailto:[email protected]]<B>On Behalf Of </B>Jack =
Jin<BR><B>Sent:</B>=20
27 June 2003 20:13<BR><B>To:</B> imc-cml<BR><B>Subject:</B>=20
Question<BR><BR></FONT></DIV>
<DIV><SPAN class=3D091490119-27062003><FONT =
size=3D2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=3D091490119-27062003><FONT =
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D091490119-27062003><FONT size=3D2>I using SFL v2.1. I =
got a=20
problem.</FONT></SPAN></DIV>
<DIV><SPAN class=3D091490119-27062003><FONT =
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D091490119-27062003><FONT size=3D2>I initilize class =
CSM_AppLogin=20
with "sm_free3DLL" library in the main thread .&nbsp; I pass the pointer =
of=20
CSM_AppLogin object&nbsp; to another thread created by main =
thread.&nbsp; In=20
that thread I try to create CSM_MsgToSign object to sign data, but the =
thread=20
blocked. If I use CSM_AppLogin and CSM_MsgToSign&nbsp; in same thread, =
it didn't=20
blocked and works fine.</FONT></SPAN></DIV>
<DIV><SPAN class=3D091490119-27062003><FONT =
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D091490119-27062003><FONT size=3D2>Thanks for the=20
help.</FONT></SPAN></DIV>
<DIV><FONT size=3D2><A =
href=3D"mailto:[email protected]"></A></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DVerdana size=3D2>Jack Jin</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>Software Developer</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>Edisoft Inc</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2><BR></FONT><FONT=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Arial'"><BR>&nbsp;</DIV></FONT>
<DIV>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0004_01C33EEB.CED491E0--