Photon System Threads

@mdma - Huge favor to ask, since messages like this one make me realize many users are tackling this problem and coming up short: could you please provide some sample code for bootstrapping a cloud connection in MANUAL mode with threading enabled? As it is, I’m sure everyone is devising their own ugly if/else blocks going through the same sequence of steps to attaining cloud nirvana.
However, when one’s main reason to use this feature is simply to avoid being blocked by system code, the path to connectivity is the well-trodden one that SYSTEM_MODE(AUTOMATIC) takes, with maybe a convenient switch on whether to enter listening mode or not.

I realize there may be different approaches, like time delays between retries vs. waiting on ready/connected flags to get set, but at least one canonically robust example would be great.

1 Like