From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81542 invoked by alias); 20 Aug 2019 15:19:40 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 81534 invoked by uid 89); 20 Aug 2019 15:19:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Google-DKIM-Signature:sender, cooperative, sebastian, Sebastian X-HELO: mail-pg1-f181.google.com Received: from mail-pg1-f181.google.com (HELO mail-pg1-f181.google.com) (209.85.215.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 20 Aug 2019 15:19:38 +0000 Received: by mail-pg1-f181.google.com with SMTP id w10so3435329pgj.7 for ; Tue, 20 Aug 2019 08:19:38 -0700 (PDT) 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=/0ikgN+EIjySToXWT77qx+oaXNgx7V23GEAPAmSRysE=; b=gOsCbahZ7/n6ABye8x3cE0w7H3n48IZ/mZBmtHoYmxwgYT/y2aYbi0CgdptaE9sfm+ 3ZrAsCaslBY4YvhhB8t6iIa9BOkurieca8gpsYu+8rW+3vm6sgAlvUHoKtOvv4MOIvoM 39hdhjSDa1l1rm89UYih/U+Lw8lTQNgJ8+kx3F+5shgj7lq1ru8NSBNM9ZeZyyrXrldt CoxGwMIfRGF3CAZl/r/6aMllqOYbCRb/imchBMKgDyd760Vs/BVQeksxp1AYmlUqlZpl +7qb82GG8U+L/4AWgrQa6Dmkuci6HTWXsqonWc4bcmB3/dOxIDa5QGBBKCaCfeSEPa9V T5tg== Return-Path: Received: from ?IPv6:2620:10d:c0a3:1407:7043:41c5:765d:10c8? ([2620:10d:c091:500::3:b]) by smtp.googlemail.com with ESMTPSA id z19sm17406818pgv.35.2019.08.20.08.19.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Aug 2019 08:19:35 -0700 (PDT) Subject: Re: For which gcc release is going to be foreseen the support for the Coroutines TS extension? To: Iain Sandoe , Sebastian Huber Cc: GCC References: <68aa9c80-0ccc-19d2-363c-82a444c628f5@embedded-brains.de> <87lfwlcfvb.fsf@oldenburg2.str.redhat.com> <75F0CC8E-8255-4A0C-9D14-AA1A6349440D@googlemail.com> From: Nathan Sidwell Message-ID: Date: Tue, 20 Aug 2019 15:19:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <75F0CC8E-8255-4A0C-9D14-AA1A6349440D@googlemail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2019-08/txt/msg00161.txt.bz2 On 7/26/19 6:03 AM, Iain Sandoe wrote: > Hello Sebastian, > >> On 26 Jul 2019, at 10:19, Florian Weimer wrote: >> C++ coroutines are stackless. I don't think any new low-level run-time >> support will be needed. > > correct, C++20 coroutines and threading mechanisms are orthogonal > facilities; one can use (IS C++20) coroutines on top of a threaded system > or in a single-threaded environment. > > Two places I see them as being a go-to facility in embedded systems are: > * co-operative multi-tasking UIs on single-threaded platforms. > * async I/O completion by continuations, rather than callbacks. There are cases where the overhead of threads is too expensive. For instance hiding (cache-missing) load latencies by doing other work while waiting -- a context switch at that point is far too expensive. nathan -- Nathan Sidwell