Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
microsoft.public.dotnet.framework.remoting
Re: CAO Factory and Threading
Ken Kolda
11/1/2004 4:36:00 PM
Although remoting is multithreaded, individual remoted objects are not
assigned their own thread. An inbound request can be serviced by any thread
in the thread pool, so there's no guarantee that the same thread will be
used on subsequent requests into the same remote object. Now, on the other
hand, if what you're really asking is "how can I make sure that two threads
don't access my object concurrently", the answer is in using the locks, e.g.
lock (this)
{
// .. Access your resource here that needs to be protected from
concurrent thread access.
}
Hope that helps -
Ken
"M H via .NET 247" <anonymous@dotnet247.com> wrote in message
news:e$XfNA0vEHA.1988@TK2MSFTNGP12.phx.gbl...
> Hi,
> I am using a SAO (Singleton) as a Factory for CAO;
>
> My Question: How can i assure, that every instance of a CAO is running in
a separated Thread ?
>
> --------------------------------
> From: M H
>
> -----------------------
> Posted by a user from .NET 247 (
http://www.dotn...
)
>
> <Id>ENvgGI2m7kKh+T67XUn4Kw==</Id>
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: CAO Factory and Threading
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password