From owner-freebsd-threads@FreeBSD.ORG Tue Nov 8 07:07:02 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C2F4816A41F for ; Tue, 8 Nov 2005 07:07:02 +0000 (GMT) (envelope-from NKoch@demig.de) Received: from server.absolute-media.de (server.absolute-media.de [213.239.231.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BC5F43D46 for ; Tue, 8 Nov 2005 07:07:01 +0000 (GMT) (envelope-from NKoch@demig.de) Received: from localhost (unknown [127.0.0.1]) by server.absolute-media.de (Postfix) with ESMTP id 01801A40D3; Tue, 8 Nov 2005 08:07:00 +0100 (CET) Received: from server.absolute-media.de ([127.0.0.1]) by localhost (server [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09507-01; Tue, 8 Nov 2005 08:06:54 +0100 (CET) Received: from firewall.demig (p50839BB8.dip0.t-ipconnect.de [80.131.155.184]) by server.absolute-media.de (Postfix) with ESMTP id 179BC8A1C1; Tue, 8 Nov 2005 08:06:54 +0100 (CET) Received: from ws-ew-3 (ws-ew-3.w2kdemig [192.168.1.72]) by firewall.demig (8.13.5/8.13.4) with SMTP id jA876chY043817; Tue, 8 Nov 2005 08:06:38 +0100 (CET) (envelope-from NKoch@demig.de) From: "Norbert Koch" To: "Nicolas Blais" Date: Tue, 8 Nov 2005 08:06:46 +0100 Message-ID: <000701c5e432$fb600980$4801a8c0@ws-ew-3.demig.intra> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 In-reply-to: <200511071638.12602.nb_root@videotron.ca> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0 Importance: Normal X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at absolute-media.de Cc: freebsd-threads@freebsd.org Subject: RE: c++ with pthread? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Nov 2005 07:07:02 -0000 > -----Original Message----- > From: Nicolas Blais [mailto:nb_root@videotron.ca] > Sent: Monday, November 07, 2005 10:38 PM > To: Norbert Koch > Cc: freebsd-threads@freebsd.org > Subject: Re: c++ with pthread? > > > On November 7, 2005 02:10 am, Norbert Koch wrote: > > Hi. > > If you want to have classes with threads, I suggest > > you try the port devel/commoncpp. It is a portable > > c++ library for multi-threading. From my experience > > it works fine. > > Norbert > > > > Thanks for your reply! > > Performance wise, would you think commoncpp is better with threads than > directly pthread? > > Nicolas. Commoncpp tries to be platform-independent. So, no. What performance are you talking about? Thread creation may be slower, but context changes are always handled by pthread. So there would be no difference. Mutexes and conditionals will be slower too. I never ran any benchmarks.