c++ - How do I reverse set_value() and 'deactivate' a promise? -


i have total n00b question here on synchronization. have 'writer' thread assigns different value 'p' promise @ each iteration. need 'reader' threads wait shared_futures of value , process them, , question how use future/promise ensure reader threads wait new update of 'p' before performing processing task @ each iteration? many thanks.

a promise/future pair designed carry single value (or exception.). you're describing, want adopt different tool.

if wish have multiple threads (your readers) stop @ common point, might consider barrier.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -