Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 03-30-2004
level level is offline
Registered User
 
 
Join Date: Feb 2004
Location: China
Posts: 71
One proxy one thread?

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?
Reply With Quote
  #2 (permalink)  
Old 03-30-2004
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
No, proxies do not share any thread. Proxies are fully thread safe, and you can use them in whatever thread you like.
Reply With Quote
  #3 (permalink)  
Old 03-30-2004
level level is offline
Registered User
 
 
Join Date: Feb 2004
Location: China
Posts: 71
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 .
Reply With Quote
  #4 (permalink)  
Old 03-30-2004
mes's Avatar
mes mes is online now
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 971
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,
- Mark
Reply With Quote
  #5 (permalink)  
Old 03-30-2004
level level is offline
Registered User
 
 
Join Date: Feb 2004
Location: China
Posts: 71
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?
Attached Files
File Type: zip hello.zip (16.3 KB, 42 views)
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Abort thread in C# acbell Help Center 1 01-03-2006 05:05 PM
Is a proxy can be called in different thread at the same time? rano Help Center 1 06-01-2005 11:54 PM
a thread problem fw_csha Help Center 2 05-15-2005 06:41 AM
Ice::Thread and GUI with Qt catalin Help Center 5 09-08-2004 11:20 AM
Bug in IceUtil::Thread kssreeram Help Center 1 04-22-2004 12:30 AM


All times are GMT -4. The time now is 09:02 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.