471,610 Members | 1,331 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,610 software developers and data experts.

Remoting - Threading

Hi,

I have a single threaded server application except for async socket
methods.
Anyway, i need to host some remote objects but remoting mechanism
spawns new threads for remote calls. I don't know about .net threading
too much. On the sockets part, i can send a response with a delay, so i
can exchange info with main thread using queues, generate a response on
main thread and send it. But i need to do something to block client if
i try to use remoting same way. Maybe with something like
SynchronizedQueue in java.

Any solutions?

Thanks.

Jan 3 '06 #1
1 1773
Antimon wrote:
I have a single threaded server application except for async socket
methods.
Anyway, i need to host some remote objects but remoting mechanism
spawns new threads for remote calls. I don't know about .net threading
too much. On the sockets part, i can send a response with a delay, so i
can exchange info with main thread using queues, generate a response on
main thread and send it. But i need to do something to block client if
i try to use remoting same way. Maybe with something like
SynchronizedQueue in java.

Any solutions?


I'm not sure, but it sounds like you could be after a producer/consumer
queue.
See http://www.pobox.com/~skeet/csharp/t...eadlocks.shtml
(second half of the page).

The main thread would be consuming the messages generated on the worker
threads.

It's not entirely clear to me how this would help you though.

You might want to look into implementing ISynchronizeInvoke so that
other threads could effectively run arbitrary delegates on the main
thread.

Jon

Jan 3 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Bruce M. Carroll | last post: by
2 posts views Thread by Brad Quinn | last post: by
9 posts views Thread by Nak | last post: by
2 posts views Thread by greg.merideth | last post: by
2 posts views Thread by danielhamd | last post: by
2 posts views Thread by =?Utf-8?B?TWljaGFlbCBNYWVz?= | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by CCCYYYY | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.