🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Indy AThread Question

#5098
From: James
Date: Sun, 17 Oct 2004 11:26
23 lines
1587 bytes
Hello,

A quick question, if you don't mind...

Is AThread threadsafe? Here's what I'm trying to do with it:

After the client connects, the server saves a pointer to the AThread in a 
TList. The server's TCPServer->OnExecute thread then runs normally. 
Meanwhile, another thread in the program has access to the TList, and is 
using the pointer to the AThread to send data to the client. The TList is 
protected by Critical Sections.

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?

I'm using BCB6 Enterprise and Indy 9, by the way.

Thanks for any advice you can give,

- James 
Technical Details
Message-ID: <417256cf$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,67c4133e59baab76,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "James" <jb9@btinternet.com>
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Indy AThread Question
Date: Sun, 17 Oct 2004 12:26:10 +0100
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: 217.42.177.106
Message-ID: <417256cf$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1098012367 217.42.177.106 (17 Oct 2004 04:26:07 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail