Archived
This forum has been archived. Please start a new discussion on GitHub.
One proxy one thread?
level
in Help Center
All proxy that maked by the same adapter in the server side does share the same thread?
How can I make the proxy with a thread not the only same thread?
Once call once a thread?
How can I make the proxy with a thread not the only same thread?
Once call once a thread?
0
Comments
-
Could you write a example that show all proxy in their own self thread?
.ice like
#ifndef HELLO_ICE
#define HELLO_ICE
class Hello
{
nonmutating void sayHello(long i);
idempotent void shutdown();
};
class MyServer
{
Hello* Create(string one);
};
#endif
the HelloI 's sayHello like
void
HelloI::sayHello(::Ice::Long i,
const Ice::Current& current) const
{
if(i==0)
{
Sleep(5000);
cout << "Sleep(5000);" << endl;
return ;
}
cout << "Hello World!" << endl;
}
That is , run two clients ,one call sayHello(0) first ,then one call sayHello(1) ,why the consol could not show one proxy one thread .0 -
In the default configuration, Ice has only one thread in its server thread pool, which means there can be at most one operation dispatched at a time. If you want to allow multiple operations to be dispatched simultaneously, change the property Ice.ThreadPool.Server.Size to a value greater than one.
Take care,
- Mark0 -
I have already set Ice.ThreadPool.Server.Size =10
but they run like in order? not parallel!
the example like this attach file,
Could you help me ?
You should run two client ,one type key "t" that run long ,one type key "o" that run soon,I want to the tow client run paralle.
Coule you test?0
