🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Does Sleep() in a TThread put the entire Program on hold?

#11848
From: Remy Lebeau (TeamB)
Date: Tue, 13 Jan 2004 01:22
19 lines
1613 bytes
"PC Hua" <home-at-huaonline.dot.com> wrote in message
news:opr1ova71yeb6hof@newsgroups.borland.com...
> Is that (see subject) true?

No.  It holds up the calling thread only.

> What is the best way to put a TThread to sleep?

By calling Sleep().

> If I use Suspend I have to Resume it after certain time

Correct.  Also, you would have to resume it from a different thread, it will
not be able to resume itself since it is suspended from doing anything
itself at all until it is resumed.


Gambit
Technical Details
Message-ID: <400346eb$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nx02.iad01.newshosting.com!216.196.98.140.MISMATCH!border1.nntp.ash.giganews.com!nntp.giganews.com!newshosting.com!news-xfer1.atl.newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <opr1ova71yeb6hof@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,fd7e6a3bf57d032f
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-01-12 17:20:56 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <opr1ova71yeb6hof@newsgroups.borland.com>
Subject: Re: Does Sleep() in a TThread put the entire Program on hold?
Date: Mon, 12 Jan 2004 17:22:34 -0800
Lines: 21
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: 67.22.138.253
Message-ID: <400346eb$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1073956587 67.22.138.253 (12 Jan 2004 17:16:27 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nx02.iad01.newshosting.com!216.196.98.140.MISMATCH!border1.nntp.ash.giganews.com!nntp.giganews.com!newshosting.com!news-xfer1.atl.newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail