From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id A2885BA24A for ; Tue, 19 Mar 2024 09:21:33 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 77EE61B5B1 for ; Tue, 19 Mar 2024 09:21:33 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Tue, 19 Mar 2024 09:21:32 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 9A64546783 for ; Tue, 19 Mar 2024 09:21:32 +0100 (CET) Message-ID: <62b04b1b-167a-49cb-b680-90eabc83f1c2@proxmox.com> Date: Tue, 19 Mar 2024 09:21:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta To: Dominik Csapak , Proxmox VE development discussion References: <20240318134454.2908174-1-d.csapak@proxmox.com> Content-Language: en-GB From: Thomas Lamprecht In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.054 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: Re: [pve-devel] [RFC PATCH widget-toolkit] utils: API2Request: defer masking after layout X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Mar 2024 08:21:33 -0000 On 19/03/2024 08:44, Dominik Csapak wrote: > thinking about it a bit more though, i think what would be better here > is a ref counting of running api2 requests on that waitMsgTarget > and only unmask when the count reaches zero... I'll send a v2 for that fine by me, both have some coupling in how the component is doing loading and could theoretically break and possibly have a tiny chance that they result in flickering when having the UI open on a localhost and the first load finishes before the second one started. In anyway, this would be still a improvement over the current situation, so fine by me. On 19/03/2024 08:44, Dominik Csapak wrote: > On 3/18/24 16:50, Thomas Lamprecht wrote: >> On 18/03/2024 14:44, Dominik Csapak wrote: >>> the masking if this marker is still there. (thankfully javascript is >>> single threaded so this should not end up being a data race) >> >> Note that async could cause data races also in single-threaded >> code, but as we do not use that here and no yield point exist >> that doesn't matter here – just mentioning it because the statement >> would suggest that one could not have code that is susceptible to >> such a race at all in JavaScript, which is not true. > > true, but those can only happen (as you mentioned) at yield points (await) > and since most of our code is non-async i did not mention it here, but > yeah one additional sentence about it being non async is probably warranted yeah, as said, just your blanket statement is wrong in the general sense, so I'd either drop it or adapt it to "as we're in synchronous JS code there can be no data-race" would be less contentious