🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Indy AThread Question

#5100
From: Remy Lebeau (TeamB)
Date: Sun, 17 Oct 2004 18:23
20 lines
1471 bytes
"James" <jb9@btinternet.com> wrote in message
news:417256cf$1@newsgroups.borland.com...

> Is AThread threadsafe?

No.

> Obviously there's a chance that the TCPServer's OnExecute
> thread might try to send/receive data with the AThread, at the
> same time as my other thread is using it to send data.
>
> Is this a problem?

Yes.  Multiple threads cannot both read from the socket at the same time, or
both write to the socket at the same time.  They will step over each other.
You will have to provide some kind of synching to prevent that.


Gambit
Technical Details
Message-ID: <4172b877$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <417256cf$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,67c4133e59baab76
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: <417256cf$1@newsgroups.borland.com>
Subject: Re: Indy AThread Question
Date: Sun, 17 Oct 2004 11:23:13 -0700
Lines: 22
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: 68.69.17.41
Message-ID: <4172b877$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1098037367 68.69.17.41 (17 Oct 2004 11:22:47 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail