Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » AsyncWork, IsFinished() may not be working properly
Re: AsyncWork, IsFinished() may not be working properly [message #54436 is a reply to message #54435] Sat, 18 July 2020 18:34 Go to previous messageGo to previous message
JeyCi is currently offline  JeyCi
Messages: 50
Registered: July 2020
Member
Oblivion wrote on Sat, 18 July 2020 17:55

If you look closely, you can see that we are capturing the index (i) "by value" (i.e. we are copying it):

I think I see now in the class AsyncWork in the library - something like this
void        Do(Function&& f, Args&&... args) { co.Do([=]() { ret = f(args...); }); }

- thus, by value - ok I will know... thanks!
p.s.
but in my U++ v.13068 mingw win-x32 I have no .Pick() to test your last code... (please don't ask me to update the u++ version - because I have win-x32 & last for it compiled 13664 just is having some problems with one code, about which I yet need some tests to do)... But if some changes can be done to your last code - to start it working without .Pick?.. because am trying to use .Get, neither = (deleted function), nor auto& iota (reference) helps...



Best regards.

[Updated on: Sat, 18 July 2020 18:38]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Skylark session verification
Next Topic: How do I create a loop for a window to react to volatile changes to a global variable?
Goto Forum:
  


Current Time: Sun Apr 28 20:49:29 CEST 2024

Total time taken to generate the page: 0.03993 seconds