delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/03/15/23:01:02

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=ytyiezsZOTaAiA6P
AHKX/U8Ozd/CdwX69i4mQMU6QLD93uU5Ogg84OJT8D1AD5HhUNWkYjbjf8Zw1fVz
ImqmUZhB1OMl7Jq9tlnS+irL5ko8Qf1ktN6fartMYndcihwEAr4VPs8nxNcEXlK5
hJvjWcEhY/oR7HWahF9ODUL1RGw=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=wWJsEGwYVmUg4Poc4Nuu4O
fu5oI=; b=yrPTVBmkwv8NofqjzSdxn0RMNBLDigw5o9dbreAWfmJxYu8aXeCmyX
z96vLr1l1yJQ2UiYnkSosMyGBcBAMAZDS3JL5HPEVlqiMQ7A48BhM0qtrQKNs0Pn
qbtQmd/txgFk4PGJK+KVtkrDVx8ZSvyugOomnArAXTOcYXttlraB4=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=H*M:cygwin, razenshteyn, H*MI:sk:56E8A20, H*i:sk:56E8A20
X-HELO: mx1.redhat.com
Subject: Re: std::async from C++11 does not work
To: cygwin AT cygwin DOT com
References: <56E8A202 DOT 4060600 AT mit DOT edu>
From: Yaakov Selkowitz <yselkowitz AT cygwin DOT com>
Message-ID: <56E8CC28.7080508@cygwin.com>
Date: Tue, 15 Mar 2016 21:59:52 -0500
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
MIME-Version: 1.0
In-Reply-To: <56E8A202.4060600@mit.edu>
X-IsSubscribed: yes

On 2016-03-15 19:00, Ilya Razenshteyn wrote:
> I'm trying to compile and run the below code. As a result, only one copy
> of "f" is being executed at a time, that is, no new threads are spawned.
> Does anyone know what's going on?

Could be your code.  I tried other code[1] using std::async, and 
multiple cores are definitely used when std::launch::async is specified.

[1] https://github.com/sol-prog/async_tutorial

-- 
Yaakov

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019