🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

BCB5: Multiple Threads & One Text File

#13428
From: Josh Kirkpatrick
Date: Sun, 12 Oct 2003 06:18
10 lines
1280 bytes
Hello.  I have (what I hope is) a simple question.

I want to be able to have several different threads running simultaneously,
which will each perform a certain task and write its results to a common log
file.  What would be the best method of ensuring that only one thread at a
time writes to this text file and that the rest of the threads wait their
turn?

TIA,
Josh
Technical Details
Message-ID: <3f88f22a@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!news-xfer1.atl.newshosting.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,2cf03e35cbac1db7,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-10-11 23:38:05 PST
From: "Josh Kirkpatrick" <jkirkpat@softhome.net>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: BCB5: Multiple Threads & One Text File
Date: Sun, 12 Oct 2003 02:18:33 -0400
Lines: 12
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 68.114.164.56
Message-ID: <3f88f22a@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1065939498 68.114.164.56 (11 Oct 2003 23:18:18 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!news-xfer1.atl.newshosting.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail