T
tony obrien
Hi,
I have written a Class Library in VB.net which provides Props/Meths to a
caller to hide the uglinesses of a TCP message protocol between a Client
and a Server.
All this works just fine.
Now I am trying to develop a LOAD TESTER app which spawns lotso' threads
each with this capability to bang the server.
The problerm is that the DLL class which worked just fine in a single
instance runs into problems because each version of the client-threads
seems to be reaching into the SAME copy of the DLL.
Everything I've read tells me to wrap the DLL areas that deal with
variables in SyncLocks... but this is NOT what I want... The DLL is NOT
STATELESS and so each new thread needs to have ITS OWN UNIQUE COPY of the
dll and its variables.
So the question is How Do I instantiate the DLL (class) in the thread to
ensure that it gets a NEW UNIQUE COPY running?
BTW, currently NONE of the Class's variables are public (though the
Props/Meths must be.) And the class DOES attempt to create a new copy
using...
Dim myDLLCls as theDLLClass
myDLLCls = New theDLLClass
but this does NOT generate a NEW copy in this thread.
Help !
regards,
tob
I have written a Class Library in VB.net which provides Props/Meths to a
caller to hide the uglinesses of a TCP message protocol between a Client
and a Server.
All this works just fine.
Now I am trying to develop a LOAD TESTER app which spawns lotso' threads
each with this capability to bang the server.
The problerm is that the DLL class which worked just fine in a single
instance runs into problems because each version of the client-threads
seems to be reaching into the SAME copy of the DLL.
Everything I've read tells me to wrap the DLL areas that deal with
variables in SyncLocks... but this is NOT what I want... The DLL is NOT
STATELESS and so each new thread needs to have ITS OWN UNIQUE COPY of the
dll and its variables.
So the question is How Do I instantiate the DLL (class) in the thread to
ensure that it gets a NEW UNIQUE COPY running?
BTW, currently NONE of the Class's variables are public (though the
Props/Meths must be.) And the class DOES attempt to create a new copy
using...
Dim myDLLCls as theDLLClass
myDLLCls = New theDLLClass
but this does NOT generate a NEW copy in this thread.
Help !
regards,
tob