From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: [External] : Re: Would you say this information window is well designed? Date: Sat, 27 Feb 2021 23:44:18 +0200 Message-ID: <8f6be1e9-09ab-09ae-69cd-eef092d4dc8b@yandex.ru> References: <83eeh6vmg2.fsf@gnu.org> <835z2ivknw.fsf@gnu.org> <83sg5mu1hn.fsf@gnu.org> <83r1l6tzbo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37417"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: larsi@gnus.org, stefankangas@gmail.com, drew.adams@oracle.com, emacs-devel@gnu.org To: Eli Zaretskii , Peter Dean Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 27 22:45:19 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lG7Oo-0009Zj-Ui for ged-emacs-devel@m.gmane-mx.org; Sat, 27 Feb 2021 22:45:18 +0100 Original-Received: from localhost ([::1]:53184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lG7On-0001bz-SS for ged-emacs-devel@m.gmane-mx.org; Sat, 27 Feb 2021 16:45:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lG7Nz-0001Ac-Tv for emacs-devel@gnu.org; Sat, 27 Feb 2021 16:44:27 -0500 Original-Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:39033) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lG7Nx-0000KH-K3; Sat, 27 Feb 2021 16:44:27 -0500 Original-Received: by mail-wr1-x433.google.com with SMTP id b18so5572736wrn.6; Sat, 27 Feb 2021 13:44:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=L2NSqtBlmsdCSAtzHB0sOyFPJTZ+HxI8OLnGgD6m4EY=; b=R7sCa5EGZVZQFTwCMEge8NkarrC78ovn4nBcqRdklM7ACx2tyTKYX0SEUNXi4OmhgE 4lZmkhQRovBc6mqxAn92xC5PqoEqQyA8A+lESapkilkmsEMe8YfAHwwEWa3j87MPvazv KsHk8LzoGqEgIJbIF+xqY8JzzZNxr18iyuA7/sEBOcmkwS9sILtFRFWMnl6QI/XOXZtN TvvbDicD+Z78xCKeihC8I7MtejfX4TZaDSFQjcZW22Z5Ip6VvJ90P+em2UTxO+/VvizF V4/ZR7J9a2kC+TcziqQXM5a7z7VR+CF3WDjTuiSqzAP3k59G9ARGidCEDO6m8nwl5rS8 FN4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=L2NSqtBlmsdCSAtzHB0sOyFPJTZ+HxI8OLnGgD6m4EY=; b=L/zzbuk0xqBX/mJ/c/SHzDKkE+oPX9H9vKfGCXLFz1Zhb5quhfhr1F+HDzpYKt7HU2 wuIbOHt5zF/Yks2lFvxyLtABTrWFNGnaRKPWbLO2SRF+aXa+bcZoY/yIpA4m9WrWS/vR Ce52pZ9crn3O2jzf8NL4ttPhZK+/Y2IctZbbE15yq9HrGj6nrKfOuLJqpMSnHX8PLJ0K oDUlj++ZbGAppKq1ReTC6h+VxD7sJJdwt8Zb34wkdgQ/+5I9KLuDIBW8NFktAmodJ6n3 aWyO0yCGgVEBd6OcGgKD/yFdB77vJJEH27wC4mK9xaVW3tNG+v5fH9uWqmaBKlimR2jX TgaA== X-Gm-Message-State: AOAM532qZR/HUMtMOINq/WtgD4sN/EJmSpcAr/rTs7MjfmMOCxoIhHR1 QsTGnCo3WmoI4ZukApd6KgehqrPqYNI= X-Google-Smtp-Source: ABdhPJz3UJPTkDW4S8XT/fTbTVghJ88tyYQaRhtXdmRlhNyoMx/wYi9BttzhqL1hfzxJkeYVAPQDfg== X-Received: by 2002:adf:ee4f:: with SMTP id w15mr8939769wro.199.1614462263738; Sat, 27 Feb 2021 13:44:23 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id h10sm17191649wrp.22.2021.02.27.13.44.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Feb 2021 13:44:23 -0800 (PST) In-Reply-To: <83r1l6tzbo.fsf@gnu.org> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=raaahh@gmail.com; helo=mail-wr1-x433.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.35, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:265739 Archived-At: On 23.02.2021 20:26, Eli Zaretskii wrote: >> Date: Tue, 23 Feb 2021 17:59:08 +0000 >> From: Peter Dean >> Cc: "drew.adams@oracle.com" , "stefankangas@gmail.com" , "larsi@gnus.org" , "dgutov@yandex.ru" , "emacs-devel@gnu.org" >> >> Then there could be a refresh rate value (e.g. 15 ms or some other value, >> configurable) and thread-yield could check if the main thread got the lock >> within this time window. >> >> If not then it would give the lock explicitly to the main thread, otherwise >> the next thread gets the lock. > > thread-yield runs in the context of the thread that yields. You make > it sound like there's some entity other than the involved threads > which runs thread-yield, but that's not what happens. It was also my impression that the threading facility in Emacs is incomplete. For one thing, error handling is very low-level (saving only the last error looks like a straight translation from C). Another: there is no 'thread-resume' which some came to expect from other languages. Examples: https://ruby-doc.org/core-2.5.0/Fiber.html#method-i-resume https://github.com/laverdet/node-fibers ("run() will start execution of this Fiber, or if it is currently yielding * it will resume execution") But it seems we can substitute with condition-wait (in the worker thread) + condition-notify (in an idle timer which it would create before waiting). That should help suspend-resume the worker thread on a regular basis, all the while giving the main thread the time to do its thing. Either way, I don't think this can solve the original issue. Having a link appear only some time after a Help buffer is shown is not a great experience either: blinking elements are a visual nuisance. So if we could pre-index the manual for symbols, that would be preferable.