🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #1086

Re: TIdSync get variable from main thread

#1086
From: Remy Lebeau (TeamB)
Date: Fri, 04 May 2007 17:10
24 lines
1750 bytes
<column.column@gmail.com> wrote in message
news:463b462d@newsgroups.borland.com...

> it doesn't looks thread safe to add ReturnInfo variable and
> read information from it after Write method called.

Yes, it is, because the worker thread will not be accessing the
ReturnInfo until after DoSynchronize() has exited, so the main thread
won't be using it anymore by that time.

>     procedure TLogSync.DoSynchronize;
>     begin
>         // write fDirection, fLine, and fIPAddress to TRichEdit as
> needed...
>     ReturnInfo:=.
>     end;

You can access your necessary data the same way you are accessing the
TRichEdit.  If you have a pointer to your form, then you can access
its members normally.


Gambit
Technical Details
Message-ID: <463b6a72$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!198.186.194.247.MISMATCH!news-out.readnews.com!news-xxxfer.readnews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <463b462d@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,9e9a94befee4f1e1
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <463b462d@newsgroups.borland.com>
Subject: Re: TIdSync get variable from main thread
Date: Fri, 4 May 2007 10:10:20 -0700
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 75.82.60.244
Message-ID: <463b6a72$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1178298994 75.82.60.244 (4 May 2007 10:16:34 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!198.186.194.247.MISMATCH!news-out.readnews.com!news-xxxfer.readnews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail