02-17-2016, 10:58 PM
(This post was last modified: 02-17-2016, 11:20 PM by LogicParrot.)
But this simple system also works for returned results: Make the other process send a message back via a nested lambda. Deadlock nonexistence guaranteed.
cRoot::foo would like to access cWorld::isNameDupe:
cRoot::foo would like to access cWorld::isNameDupe:
void cRoot::foo(cPlayer & a_Player) { a_Player.GetWorld()->message([this, a_Player](cWorld & a_World){ if (a_World.IsNameDupe(a_Player.GetName())) { this.message([a_Player](cRoot & a_Root){ a_Player->myn(); // or whatever. a_Player->qwerty(5, 20); // or whatever. }); } else { this.message([a_Player](cRoot & a_Root){ a_Player.xyz() // or whatever a_Player.abc(a_Root.ikj()); // or whatever. a_Root.etc(); // or whatever. }); } }); }