From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.bugs Subject: bug#29704: Guile 2.2.2: SRFI-18, condition variables, timeouts Date: Fri, 16 Feb 2018 15:31:02 +0100 Message-ID: <87h8qhnh09.fsf@gnu.org> References: <47bd4b8a-55fe-bc92-4a64-b8bdeba2e5d5@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1518791421 10142 195.159.176.226 (16 Feb 2018 14:30:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 16 Feb 2018 14:30:21 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cc: 29704-done@debbugs.gnu.org To: David Beswick Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Fri Feb 16 15:30:17 2018 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emh1d-0001vu-I0 for guile-bugs@m.gmane.org; Fri, 16 Feb 2018 15:30:09 +0100 Original-Received: from localhost ([::1]:55186 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emh3f-0002yZ-J4 for guile-bugs@m.gmane.org; Fri, 16 Feb 2018 09:32:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emh3W-0002xl-1Y for bug-guile@gnu.org; Fri, 16 Feb 2018 09:32:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1emh3S-0005RU-Tl for bug-guile@gnu.org; Fri, 16 Feb 2018 09:32:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37928) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1emh3S-0005RK-PV for bug-guile@gnu.org; Fri, 16 Feb 2018 09:32:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1emh3S-0004SN-K6 for bug-guile@gnu.org; Fri, 16 Feb 2018 09:32:02 -0500 Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-To: bug-guile@gnu.org Resent-Date: Fri, 16 Feb 2018 14:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 29704 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Mail-Followup-To: 29704@debbugs.gnu.org, ludo@gnu.org, dlbeswick@gmail.com Original-Received: via spool by 29704-done@debbugs.gnu.org id=D29704.151879146917042 (code D ref 29704); Fri, 16 Feb 2018 14:32:02 +0000 Original-Received: (at 29704-done) by debbugs.gnu.org; 16 Feb 2018 14:31:09 +0000 Original-Received: from localhost ([127.0.0.1]:45821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emh2b-0004Qn-9X for submit@debbugs.gnu.org; Fri, 16 Feb 2018 09:31:09 -0500 Original-Received: from hera.aquilenet.fr ([185.233.100.1]:35108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emh2Z-0004Qf-Uv for 29704-done@debbugs.gnu.org; Fri, 16 Feb 2018 09:31:08 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id E1EB2115E1; Fri, 16 Feb 2018 15:31:06 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Original-Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E-TY8huRKCcM; Fri, 16 Feb 2018 15:31:03 +0100 (CET) Original-Received: from ribbon (unknown [193.50.110.160]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 08BB5115AC; Fri, 16 Feb 2018 15:31:02 +0100 (CET) In-Reply-To: <47bd4b8a-55fe-bc92-4a64-b8bdeba2e5d5@gmail.com> (David Beswick's message of "Thu, 14 Dec 2017 12:37:41 +1100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:9011 Archived-At: Hi David, David Beswick skribis: > I would expect the following command to return in 5 seconds: > $ guile -c '(use-modules (srfi srfi-18)) (let ((cv > (make-condition-variable)) (m (make-mutex))) (mutex-lock! m) > (mutex-unlock! m cv 5))' > > However, it returns instantly for me. This command works as expected: > $ guile -c "(use-modules ((srfi srfi-18) #:prefix srfi:)) (let ((cv > (srfi:make-condition-variable)) (m (srfi:make-mutex))) > (srfi:mutex-lock! m) (srfi:mutex-unlock! m cv (+ (current-time) 5)))" > > > It's stated on the page https://srfi.schemers.org/srfi-18/srfi-18.html th= at: > > "All synchronization primitives which take a timeout parameter accept thr= ee > types of values as a timeout, with the following meaning: > > * a time object represents an absolute point in time > > * an exact or inexact real number represents a relative time in > seconds from the > =C2=A0 moment the primitive was called > > * #f means that there is no timeout" > > Assuming this page is accurate, then the case in the test code > falls under the second dot point from the spec. Sorry the late reply. I believe this and a similar issue with =E2=80=98thread-sleep!=E2=80=99 is now fixed: https://git.savannah.gnu.org/cgit/guile.git/commit/?h=3Dstable-2.2&id=3D2= c7b350f93564daee16a311c001a85577d4b69e1 https://git.savannah.gnu.org/cgit/guile.git/commit/?h=3Dstable-2.2&id=3D3= 9860539599f74958c0cc9008fc6fa271349b58b Let me know if anything=E2=80=99s wrong! Thank you, Ludo=E2=80=99.