Re: Getting a ThreadList without locking (TIdTCPServer)
From: Dean (dean_at_[spambuster)
Date: 01/16/04
- Next message: Jeremy Collins: "Re: Registry on another machine"
- Previous message: Ben Hochstrasser: "Re: Registry on another machine"
- In reply to: Dean: "Re: Getting a ThreadList without locking (TIdTCPServer)"
- Next in thread: Rob Kennedy: "Re: Getting a ThreadList without locking (TIdTCPServer)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 16 Jan 2004 09:28:38 -0000
Anyone?
"Dean" <dean[no-spam]@weany.com> wrote in message
news:4006c5f0$3@newsgroups.borland.com...
> Thanks Rob,
>
> In which case, as an alternative (as I know eactly which threads I want to
> mutex) can I call a lock to a select number of the threads only?
>
> I can maintain my own TList of pointers for reference, then I just want to
> keep those threads only out of this specific procedure.
>
> Thanks,
>
> D
>
> "Rob Kennedy" <.> wrote in message news:4006be0a@newsgroups.borland.com...
> > Dean wrote:
> > > Is there a way I can get a TList of pointers to TIdPeerThreads
currently
> > > active on TIdTCPServer without actually calling the mutex and locking
> the
> > > threads?
> > >
> > > Or do I have to do:-
> > >
> > > var List : TList;
> > > begin
> > > List := MyServer.Threads.Lock;
> > > MyServer.Threads.Unlock;
> >
> > You could do that, but as soon as you do, the state of the list will be
> > unpredictable. Some other thread might add or remove items from the list
> > while this thread is using it unprotected.
> >
> > --
> > Rob
>
>
- Next message: Jeremy Collins: "Re: Registry on another machine"
- Previous message: Ben Hochstrasser: "Re: Registry on another machine"
- In reply to: Dean: "Re: Getting a ThreadList without locking (TIdTCPServer)"
- Next in thread: Rob Kennedy: "Re: Getting a ThreadList without locking (TIdTCPServer)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|