[J3] [SC22WG5.6681] Comment on 23-174
Van Snyder
van.snyder at sbcglobal.net
Thu Apr 10 00:08:24 UTC 2025
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20250409/59c75663/attachment.htm>
More information about the J3
mailing list