[Ace-users] [tao-users] How to control thread usage in combined client/server application
Andrew L. Shwaika
als at solvo.ru
Wed Nov 28 09:43:51 CST 2007
TAO VERSION: 1.6.1
ACE VERSION: 5.6.1
HOST MACHINE and OPERATING SYSTEM:
AMD Athlon(tm) 64 X2 Dual Core Processor 3600+
Fedora Core 6 x86_64
TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
COMPILER NAME AND VERSION (AND PATCHLEVEL):
gcc version 4.1.2 20070626 (Red Hat 4.1.2-13)
THE $ACE_ROOT/ace/config.h FILE:
THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE:
ssl = 1
no_hidden_visibility = 1
buildbits = 64
CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
(used by MPC when you generate your own makefiles):
cat > $ACE_ROOT/bin/MakeProjectCreator/config/default.features <<EOF
DOES THE PROBLEM AFFECT:
OTHER (please specify)?
Application logic with client/server combined
Remote method runs in not desired thread.
I have two client/server combined application.
First, mostly client, application have designated thread with registered
POA and object and loops on orb->run.
When starts, first application calls remote method in second application
and pass object reference for callbacks.
First application interacts with user and simultaneously calls second
Second, mostly server, application answers to these calls.
Second application have dedicated thread in wich on some conditions
calls method on passed callback object.
Mostly all works fine. BUT!!! I've noticed that sometimes callback
method runs in wrong, not designated thread!
It runs in main thread when normal remote call waits for response.
And even more, sometimes normal calls to second application runs in
dedicated thread when it waits response for running callback method
This callbacks is not nested upcalls. But seems to be treated like it.
Biggest problem arise when applications use TSS (Thread specific
storage) and we can't make sure that all calls will be in desired threads!
I've tried several SvcConf options ST,RW:
static Client_Strategy_Factory "-ORBClientConnectionHandler ST"
Unfortunately without any luck.
The question is: how I can control thread usage?
I've written very simple client/server combined applications and can
provide it if needed.
[If available ]
Sorry for my bad english.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 180 bytes
Desc: not available
Url : http://list.isis.vanderbilt.edu/pipermail/ace-users/attachments/20071128/08dcaaff/attachment.vcf
More information about the Ace-users