Article View: borland.public.cppbuilder.nativeapi
Article #13545Re: Thread synchronisation - Question
From: Matt Heling
Date: Wed, 08 Oct 2003 20:25
Date: Wed, 08 Oct 2003 20:25
38 lines
2592 bytes
2592 bytes
Remy Lebeau (TeamB) <gambit47.no.spam@no.spam.yahoo.com> schrieb in im Newsbeitrag: 3f844de9@newsgroups.borland.com... > > "Matt Heling" <heli@_REMOVE_THIS_heling.de> wrote in message > news:3f84329c@newsgroups.borland.com... > > > Is there any difference in "performance" (speed) of these > > two components (TQueue & TStack). > > You said you wanted a FIFO list. TQueue is FIFO, whereas TStack is LIFO > instead. Oooooops! You are right: I said that, I remember...didn't want to confuse anybody....sorry 'bout that....That was really a good reason to suggest TQueue! :-) ......but there was the thought of getting speed advance by maybe using TStack (only if it was faster) (actually the List shall keep pointers to prepared (empty) Datacontainers and threads should exchange a pointer to a just filled Datacontainer (filled by thread2) with a pointer to an empty one, so it didn't matter, whether it was FIFO (although preferred) or a LIFO, supplied enough pointers to empty Datacontainers keep beeing available (another task for thread1). Thatswhy I was asking for any difference... > > > I could imagine, that TQueue works with InnerList->Add() > > Actually, it uses Insert(0) instead. > > > and the Pop() method returns InnerList->Items[0] > > Actually, it pops Items[Count-1] instead. > Thank you for all the information! Best regards, HELI
Technical Details
Message-ID:
<3f84725c@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f704989@newsgroups.borland.com> <3f750c0d$2@newsgroups.borland.com> <3f818e8c@newsgroups.borland.com> <3f8198e0$1@newsgroups.borland.com> <3f82de8b@newsgroups.borland.com> <3f82f6cd$1@newsgroups.borland.com> <3f84329c@newsgroups.borland.com> <3f844de9@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-08 13:41:05 PST From: "Matt Heling" <heli@heling.de> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f704989@newsgroups.borland.com> <3f750c0d$2@newsgroups.borland.com> <3f818e8c@newsgroups.borland.com> <3f8198e0$1@newsgroups.borland.com> <3f82de8b@newsgroups.borland.com> <3f82f6cd$1@newsgroups.borland.com> <3f84329c@newsgroups.borland.com> <3f844de9@newsgroups.borland.com> Subject: Re: Thread synchronisation - Question Date: Wed, 8 Oct 2003 22:25:19 +0200 Lines: 41 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 NNTP-Posting-Host: 80.140.123.66 Message-ID: <3f84725c@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1065644636 80.140.123.66 (8 Oct 2003 13:23:56 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail