Run two different patterns on two different LED strips continuously at the same time

Is it possible to run two different animations on two different LED strips concurrently from the same photon?

For example, I have a strip on which I want to run a torch animation continuously.
I have another strip on which I want to run a comet pattern continuously while intermittently changing patterns in response to cloud events.

How can I run these two codes on two separate threads of LED lights at the same time from a single photon?

Yes this should be possible. You just need to adopt a non-blocking coding paradigm then you can “time slice” between the two patterns.

@ScruffR Is there sample code that follows this non-blocking paradigm and “time slicing”?

Non-blocking can be written like this

void loop() {
  static uint32_t msTask1 = 0;
  static uint32_t msTask2 = 0;

  if (millis() - msTask1 >= 1000) {
    msTask1 = millis();

  if (millis() - msTask2 >= 1000) {
    msTask2 = millis();


but there are other things like Software Timers or more elabourate ways to do similar things, but this is a good trick of the trade to know.

The time slicing is implicit to non-blocking programming as your controller has limited cycles in which all jobs need to be done. Just keep your tasks short (or even interleave them) to prevent one cycle-hogging task from starving others.