As far as the experiences we got
recently, each request sent to the TCF agent should be in the specific dispatch
thread.
If we keep this rule, it should
be thread safe. You can check the existing code about how to call TCF
services (stream read, write, etc)
We reuse same TCF connection for
multiple tasks, seems fine, yet we did not have stress test cases currently.
Only for your reference, we’re
new to TCF too :P
Thanks& Regards,
criping
From: dsdp-tcf-dev-bounces@xxxxxxxxxxx
[mailto:dsdp-tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Karun SARASWAT
Sent: Wednesday, September 08, 2010 7:02 PM
To: dsdp-tcf-dev@xxxxxxxxxxx
Subject: [dsdp-tcf-dev] TCF protocol thread safe?
Hi
all,
I
have developed my regression test framework for testing linux device drivers
with TCF. Process service is used for launching my target test cases and client
running on PC records the result. I have developed a wrapper around client to
parse my test case files and manage the flow of the test case execution.
Now
i wish to extend it further by allowing multiple instances of regression running
on different target ( test case distribution) or multiple instance of
agent on same target. For this i want to run multiple threads of client handler
managing each agent connection.
I
want to know if TCF is thread safe if i instantiate multiple instances
of client or to be specific multiple handlers each connecting to different
targets? I want to handle context for each thread differently. I
guess for now only one handler is present which is over written for each
connect command. Can we support multiple handlers by generating unique handler
for each connection?
Please
correct me if I have misunderstood anything.
Thanks
and regards,
Karun