Article View: borland.public.cppbuilder.nativeapi
Article #13585Re: Thread synchronisation - Question
From: Matt Heling
Date: Mon, 06 Oct 2003 15:49
Date: Mon, 06 Oct 2003 15:49
40 lines
2143 bytes
2143 bytes
Hi, Remy, Remy Lebeau (TeamB) <gambit47@yahoo.com> schrieb in im Newsbeitrag: 3f750c0d$2@newsgroups.borland.com... > > "Wim Bekker" <wim@bekker> wrote in message > news:3f704989@newsgroups.borland.com... > > > But I'm wondering what exactly isn't safe. Are the VCL properties > > at risk, or is the underlying windows structure not safe? > > The VCL is not thread-safe, for the most part. Does that apply for all "Objects" of the VCL (i.e. including NON-visual Objects and Components) or does that apply to the visual Components only (GUI-Stuff)? > > > For instance, is it possible to lock the canvas of a VCL object > > in a thread and paint on it? > > No. Use Synchronize() to access the Canvas. But I've read, especially TCanvas-Objects were "lockable" using the method Lock() to avoid other running threads's access until Unlock() is called after having painted to the Canvas directly. > > > Or is it possible to supply the windows handle to a thread to paint on it? > > Possibly. > > > Or should this all be done in the main thread. > > Preferably, anything related to the GUI should be done in the main thread. > > > Gambit > >
Technical Details
Message-ID:
<3f818e8c@newsgroups.borland.com>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!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3f704989@newsgroups.borland.com> <3f750c0d$2@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-10-06 09:05:59 PST From: "Matt Heling" <heli@nospamheling.de> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f704989@newsgroups.borland.com> <3f750c0d$2@newsgroups.borland.com> Subject: Re: Thread synchronisation - Question Date: Mon, 6 Oct 2003 17:49:53 +0200 Lines: 42 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 NNTP-Posting-Host: 80.144.148.44 Message-ID: <3f818e8c@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1065455244 80.144.148.44 (6 Oct 2003 08:47:24 -0700) 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!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail