Article View: borland.public.cppbuilder.nativeapi
Article #13672Re: Thread synchronisation
From: PC HUA
Date: Thu, 25 Sep 2003 01:48
Date: Thu, 25 Sep 2003 01:48
38 lines
1904 bytes
1904 bytes
One think I can tell you, try to avoid TThread with VCL wherever you can. I had so many troubles with multiple TThreads and Canvas. After many many hours of work (with lock/unlocking etc.) I finally got it work. But then there was the problem with timing. At the end, I use TThread to run non- visual task and use timer to draw Canvas. Now it's working perfectly. Phuoc Can HUA On Tue, 23 Sep 2003 15:22:22 +0200, Wim Bekker <wim@bekker> wrote: > Hi, > > Using a TThread it is not safe to use VCL components. But I'm wondering > what > exactly isn't safe. Are the VCL properties at risk, or is the underlying > windows structure not safe? > > For instance, is it possible to lock the canvas of a VCL object in a > thread > and paint on it? > Or is it possible to supply the windows handle to a thread to paint on > it? > Or should this all be done in the main thread. > > I hope someone can give me some information about this. > > Wim > > > > -- _/\__/\__/\__/\__/\__/\_ www.huaonline.com My Homepage is my Castle
Technical Details
Message-ID:
<oprv08njgys9suau@news.cis.dfn.de>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!203.194.21.162!not-for-mailReferences:
<3f704989@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,20b65b563d927a2d X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-09-24 18:55:04 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!203.194.21.162!not-for-mail From: PC HUA <home@huaonline.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Thread synchronisation Date: Thu, 25 Sep 2003 11:48:45 +1000 Lines: 38 Message-ID: <oprv08njgys9suau@news.cis.dfn.de> References: <3f704989@newsgroups.borland.com> NNTP-Posting-Host: 203.194.21.162 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed X-Trace: news.uni-berlin.de 1064454893 6124614 203.194.21.162 (16 [168705]) User-Agent: Opera7.10/Win32 M2 build 2840