With ATTACH, you need to play games to prevent two tasks from running concurrently on two CPUs. With coroutines, you have multiples contexts within a single thread; there is no need for explicit interlocking.
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [[email protected]] on behalf of Rupert Reynolds [[email protected]] Sent: Sunday, July 16, 2023 6:01 AM To: [email protected] Subject: C++ coroutines are recent, and difficult? I must have missed the point of something, because on first reading, it's analogous to what we could do with ATTACH, ECB and WAIT in assembly under z/OS and MVS, or the equivalents in PL/I and COBOL (I assume) where we have a subtask which can wait for an event and then resume operation from its suspended state (line of code after the WAIT), or the parent task can suspend and resume the subtask when its services are required again. I also watched this video and got the same impression https://youtu.be/nGexHRT1GY0 I know it's more difficult to specify when you're making a portable language, but I feel both cheated and glad I didn't spend more time learning C++. Can anyone suggest what else C++ coroutines offer, please? TVMIA Roops ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
