From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10350 Path: news.gmane.org!.POSTED!not-for-mail From: Ward Willats Newsgroups: gmane.linux.lib.musl.general Subject: Re: std::condition_variable::wait_for() breakage when system_clock changes C++11 MIPS Date: Wed, 3 Aug 2016 10:29:45 -0700 Message-ID: <000E3F7F-D1BA-4B68-9BD2-9E69A792A080@wardco.com> References: <3008FD15-1C92-4870-9CD9-BC8B694ACCD0@wardco.com> <20160803112751.GX19691@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1470245415 14182 195.159.176.226 (3 Aug 2016 17:30:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 3 Aug 2016 17:30:15 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-10363-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 03 19:30:07 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1bUzzV-00026A-O6 for gllmg-musl@m.gmane.org; Wed, 03 Aug 2016 19:30:01 +0200 Original-Received: (qmail 15829 invoked by uid 550); 3 Aug 2016 17:29:59 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 15811 invoked from network); 3 Aug 2016 17:29:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=wardco.com; s=wardco01; h=To:References:Message-Id:Content-Transfer-Encoding:Date: In-Reply-To:From:Subject:Mime-Version:Content-Type:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=a8cOPr78wFxfnOVh0LpFnA34Miy/4EZQ85DKy1Q8qAE=; b=QJhD7uWLd/RGVR/zbIgNq8FiDW KI75aGGnhR831q7rWJBrndwEs0oUhpd3YySw0TgJiC78KL4D87pdR/6yqQc/KNpCd7iYObWfp3FWc o2QQQ7utgnqefz/NMhPIpSLnf9iq27SKeRpKH0qz+JDEqBjJFfdKvL5sQsocz1IH4I+A=; In-Reply-To: <20160803112751.GX19691@port70.net> X-Mailer: Apple Mail (2.3124) X-SA-Exim-Connect-IP: 70.36.190.3 X-SA-Exim-Mail-From: musl@wardco.com X-SA-Exim-Scanned: No (on mail.wardco.com); SAEximRunCond expanded to false Xref: news.gmane.org gmane.linux.lib.musl.general:10350 Archived-At: > On Aug 3, 2016, at 4:27 AM, Szabolcs Nagy wrote: >=20 > * Ward Willats [2016-08-02 16:33:29 -0700]: >>=20 >> In short, the std::condition_variable API that takes a = std::chrono:duration does not work, but the one that takes a = std::chrono::time_point does. >>=20 >=20 > this is a libstdc++ issue so the gcc version matters. > (i can see condvar related issues fixed in gcc bugzilla) >=20 > there are several issues with the c++11 condvar timeout api e.g. > http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#887 > so i'd avoid using c++, it's just a broken abstraction layer > on top of the pthreads api with poor specification.. meanwhile > pthreads works fine and is portable. >=20 Thanks. Don't need the portability, but is arguably MORE = portable -- depending on the platforms of interest. Anyway the pthread_t = is available if we want to get down and dirty -- and we do sometimes = (e.g. thread cancelling, naming). The link just demonstrates that = poor-old pthreads can't model the rich abstraction of C++ without work = arounds! :)=20 Anyway to each their own. I'll copy this problem over to libstdc++ = library as Patrick suggested w/appropriate versioning. Thanks for the = use of the hall. Best, -- Ward