asmodehn/WkCocos

Callbacks returned from Managers should instead be STL classes

Opened this issue · 0 comments

When we pass a callback to a Manager ( high level of abstraction of Wkcocos feature ) the user can pass a lambda function. However he has very little control on what it can do with it ( wait for it or not, do something just after, etc. )

Instead we should think about returning futures ? Or some STL Async class...
the point is to give the user more control about the Async behaivor going on in WkCocos ( due to network calls, or performance constraints ( split into small task to maximize update speed ), but still keep close to the standard.

A nice explanation of these : http://stackoverflow.com/questions/11004273/what-is-stdpromise