From owner-sc22wg5+sc22wg5-dom9=www.open-std.org@open-std.org  Thu Apr 10 02:08:29 2025
Return-Path: <owner-sc22wg5+sc22wg5-dom9=www.open-std.org@open-std.org>
X-Original-To: sc22wg5-dom9
Delivered-To: sc22wg5-dom9@www.open-std.org
Received: by www.open-std.org (Postfix, from userid 521)
	id 98397356976; Thu, 10 Apr 2025 02:08:29 +0200 (CEST)
Delivered-To: sc22wg5@open-std.org
Received: from sonic307-13.consmr.mail.ne1.yahoo.com (sonic307-13.consmr.mail.ne1.yahoo.com [66.163.190.36])
	by www.open-std.org (Postfix) with ESMTP id E92593565FF
	for <sc22wg5@open-std.org>; Thu, 10 Apr 2025 02:08:27 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sbcglobal.net; s=s2048; t=1744243706; bh=43U1Ranr+FG6vh4Yg6Q3I7pZ6g9XZaV3PzrDSy+ZMeY=; h=Subject:From:To:Date:References:From:Subject:Reply-To; b=MuEN7RNd6JPRSkdWyyLu+M73qRhraQfjm+ZGtSh8IaRgSZTNs/uy9pi/6NB2gHHiyFdywpza8sFxMnWjgrT3vm4LzVA6/tbSvEvDG2vWszLcPDjC0qLTrLIVE2oM5Ct7eJNAS21Za+687Ig0i/42Qmt5GwWc5RaeRwy3kIO/Tr50BrW4dkHotn3o127fHeI2lUquEDtbaM5dPkz9nO5wVa+y6oo6f1XCDgPT/daM64jIg+uYTMW61xIIk1brureEwLVgLE+DaW7+1N9Lqp8vPsEyVXBiJ8biS5ZipP3QbhrQ9cLfXezF0EI5CEJN1MqDW4IFvmxx8fftgYRxNIvZKA==
X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1744243706; bh=d5BU6LNAzFxUBtoJt97pO5lItQhGGIX8DSr4e4pBQ/U=; h=X-Sonic-MF:Subject:From:To:Date:From:Subject; b=Aixyf/+14oo8W2Ii6HRvB3sl30D9Pe+kACUvJyIaf2cflp5CIJimrX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C1T9im.wB
 Ym.HP7qEchAxg7WSPyylEtsM_9IHC3ai9PZ0.wfLiNU6jCKjDEYlKcmhQSc2AGpPcDpJLySbFxv4
 bF5QvwVjNrheJQXV4MjsYtQmR30DQXwtpCeVDyOldRD13Zyhvkhl5jAHj73mb8y2DUgz_Elx5K79
 0f3__Phz6YQQfAxxm5QXaBlDZzCdc47oo1HnzOUF8FRUSXWUxK4ApRBxLfH9OpG7ikkR0aXOPTH.
 CXVauiDaNAWQBwR7ItsBIJrCH.8O99s2LM5euTx0B6gQdDEe8XcFfiWLfK_OmbYEHmS.JgH6ZPno
 A57G3NcvGq.pm0Y4hNlIKEpRk2mzVd9wtGonhj0vR1t0C19XElLp72r5M02mqrFGpnd_7kyxnEnd
 wZ6FI55uyAAlb5Zv4onqbVfTHouzNQaTI6kacSA0lVQhAFryrajxDFTi6Kf5_8uiSl7SiChnCxUc
 eZ0jxCDkh_7CzoI1bzfQUIq.cazeDmXF0DhDWiZSf9OcuZ.8mhGp3UehI62LrqdUZmD.09pyNWcy
 eXCxQTT7QERlEGGESZVT3Ak9J6JvDG5veqMU-
X-Sonic-MF: <van.snyder@sbcglobal.net>
X-Sonic-ID: 6f5bcc2d-cba5-402b-8d4a-9749dd0fae68
Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Thu, 10 Apr 2025 00:08:26 +0000
Received: by hermes--production-gq1-6f8bfcd964-2cf6n (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 532cfd7d3e45bfdabbdcd4ecca2a40d7;
          Thu, 10 Apr 2025 00:08:25 +0000 (UTC)
Message-ID: <1f5c1e4d911d8e99b8343148a84a4a0cdfdd5bd1.camel@sbcglobal.net>
Subject: Comment on 23-174
From: Van Snyder <van.snyder@sbcglobal.net>
To: sc22wg5 <sc22wg5@open-std.org>
Date: Wed, 09 Apr 2025 17:08:24 -0700
Content-Type: multipart/alternative; boundary="=-LUV+dnjCpp94DJBXTZr/"
User-Agent: Evolution 3.46.4-2 
MIME-Version: 1.0
References: <1f5c1e4d911d8e99b8343148a84a4a0cdfdd5bd1.camel.ref@sbcglobal.net>
X-Mailer: WebService/1.1.23665 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

--=-LUV+dnjCpp94DJBXTZr/
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Asynchronous blocks were proposed in Section 18 in 97-114.

As described by Burns and Wellings in "Concurrent and Real-Time
Programming in Ada," processor developers and their clients discovered
that Ada tasks have significant inherent overhead imposed by their
design specification. "Protected Variables" were added to overcome
this. They are essentially coroutines. Coroutines (and iterators) have
been proposed for Fortran, and were for a short time on the development
program. Their utility in concurrent programming is well known. They
should be put back onto the development program as part of the 23-174
work item. See 04-380r2, 23-107 (a TR proposal), and 24-118.

If Fortran tasks are permitted to invoke any procedure, not just pure
ones, and allowed concurrent writes, it would be useful to have an
exclusive-use mechanism. Many languages have critical sections or
monitor procedures or both (and some rely on the lower level concept of
semaphores). Fortran has a CRITICAL section, but it applies only to
coarrays. That should be extended to asynchronous tasks. And monitor
procedures would be useful too, in both contexts.

A PARALLEL construct that specifies concurrently-executable blocks was
proposed in 06-187. Bill Long pointed out that this could be faked
using DO CONCURRENT with SELECT CASE inside. But an explicit syntactic
principle that did it would be easier to write and understand, and
maybe would give more clues to optimizers.


--=-LUV+dnjCpp94DJBXTZr/
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<html><head></head><body><div>Asynchronous blocks were proposed in Section =
18 in 97-114.</div><div><br></div><div>As described by Burns and Wellings i=
n "Concurrent and Real-Time Programming in Ada," processor developers and t=
heir clients discovered that Ada tasks have significant inherent overhead i=
mposed by their design specification. "Protected Variables" were added to o=
vercome this. They are essentially coroutines. Coroutines (and iterators) h=
ave been proposed for Fortran, and were for a short time on the development=
 program. Their utility in concurrent programming is well known. They shoul=
d be put back onto the development program as part of the 23-174 work item.=
 See 04-380r2, 23-107 (a TR proposal), and 24-118.</div><div><br></div><div=
>If Fortran tasks are permitted to invoke any procedure, not just pure ones=
, and allowed concurrent writes, it would be useful to have an exclusive-us=
e mechanism. Many languages have critical sections or monitor procedures or=
 both (and some rely on the lower level concept of semaphores). Fortran has=
 a CRITICAL section, but it applies only to coarrays. That should be extend=
ed to asynchronous tasks. And monitor procedures would be useful too, in bo=
th contexts.</div><div><br></div><div>A PARALLEL construct that specifies c=
oncurrently-executable blocks was proposed in 06-187. Bill Long pointed out=
 that this could be faked using DO CONCURRENT with SELECT CASE inside. But =
an explicit syntactic principle that did it would be easier to write and un=
derstand, and maybe would give more clues to optimizers.</div><div><br></di=
v><div><span></span></div></body></html>

--=-LUV+dnjCpp94DJBXTZr/--
