🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #1830

Re: Thread safety

#1830
From: Remy Lebeau (TeamB)
Date: Tue, 12 Jun 2007 15:04
22 lines
1484 bytes
"Colin B Maharaj" <noreply@myhost.com> wrote in message
news:466e7571$1@newsgroups.borland.com...

> First I thought I could not use ReadLn() WriteLn() in my code
> because I thought AnsiString were not thread safe. Is this still
> the case?

ReadLn() and WriteLn() work just fine in threads.

> I definitely learn't that sprintf is unsafe

That is true if you are calling sprintf() in one thread while another
thread is accessing the same AnsiString at the same time.

> Thing is now Code Guard is crashing with an access violation.

You need to be more specific.  What is the exact error message?  In
what code exactly is it being thrown?


Gambit
Technical Details
Message-ID: <466eb60d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <466e7571$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,7fa2ebca6213823d
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <466e7571$1@newsgroups.borland.com>
Subject: Re: Thread safety
Date: Tue, 12 Jun 2007 08:04:41 -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.252.126
Message-ID: <466eb60d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1181660685 75.82.252.126 (12 Jun 2007 08:04:45 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail