Article View: borland.public.cppbuilder.internet.socket
Article #1094Re: TIdSync get variable from main thread
From: Remy Lebeau (TeamB)
Date: Mon, 07 May 2007 17:20
Date: Mon, 07 May 2007 17:20
22 lines
1732 bytes
1732 bytes
<column.column@gmail.com> wrote in message news:463c8969@newsgroups.borland.com... > looks it is not safe to do like this Yes, it is safe. DoSynchronize() is called in the context of the main thread, not the worker thread. The worker thread will not be accessing ReturnInfo until after DoSynchronize() has fully exited. > because sometimes i have nonsens in ReturnInfo. Then you are doing something else wrong in your other code. The TIdSync code itself that you have shown so far is fine. > How to get data from main thread using TIdSync in > TidTCPserver.AserverSocketExecute(AContext: TIdContext); You already know the answer to that, because you are already doing it. Gambit
Technical Details
Message-ID:
<463f5fe5$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<463b462d@newsgroups.borland.com> <463b6a72$1@newsgroups.borland.com> <463c34cb$1@newsgroups.borland.com> <463c8969@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> <463b6a72$1@newsgroups.borland.com> <463c34cb$1@newsgroups.borland.com> <463c8969@newsgroups.borland.com> Subject: Re: TIdSync get variable from main thread Date: Mon, 7 May 2007 10:20:49 -0700 Lines: 24 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: <463f5fe5$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1178558437 75.82.60.244 (7 May 2007 10:20:37 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail