Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - std::shared_future failed in C++: (3 Items)
   
std::shared_future failed in C++  
Hi,

I am trying to use shared_future but without success.


The following link illustrates a clear example that works fine in Linux, but fails in QNX.
https://en.cppreference.com/w/cpp/thread/shared_future


Does anybody have an idea if this a bug in QNX?

BR,
Ilyas
RE: std::shared_future failed in C++  
Works for me.
Can you elaborate on "fails on QNX"? Fails to build? To terminate? What version of QNX are you using?

--Elad
________________________________________
From: Ilyas Hamadouche [community-noreply@qnx.com]
Sent: October-24-18 6:44 AM
To: ostech-core_os
Subject: std::shared_future failed in C++

Hi,

I am trying to use shared_future but without success.


The following link illustrates a clear example that works fine in Linux, but fails in QNX.
https://en.cppreference.com/w/cpp/thread/shared_future


Does anybody have an idea if this a bug in QNX?

BR,
Ilyas



_______________________________________________

OSTech
http://community.qnx.com/sf/go/post119232
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
Re: RE: std::shared_future failed in C++  
Thank you for response Elad. It actually builds, but when running it stuck at fut2.wait();

The output of  "pidin -p 1200146 -v" is:
        
     pid        tid name                  prio STATE          Blocked                     
 1200146   1 ./testPromise       10r CONDVAR     (0x806c17c)                 
 1200146   2 ./testPromise       10r CONDVAR     (0x806c0bc)                 
 1200146   3 ./testPromise       10r MUTEX          (0x1002b2790) self(1200146)-02 #1


My QNX version (using uname -a):
QNX localhost 7.0.1 2018/02/06-14:30:25EST x86pc x86_64

Ilyas,