ESP8266 not working with Lora transmit that uses yield() internally

Hi,

I have a code that reads a GPIO and sends it it over Lora radio on ESP8266. There is a wifi page that shows the status on a web client.
Both the radio and wifi code works independently, however WiFi doesnt work when integrated together

While debugging the problem, I reached a call to yield in the LoRa library. Commenting the yield() function makes both work.

So, my question is, what is about a call to the yield() that the wifi does not like.
Here is the problematic LoRa transmit function

Hope somebody can pinpoint the problem and provide the solution.

int LoRaClass::endPacket()
{
  // put in TX mode
  writeRegister(REG_OP_MODE, MODE_LONG_RANGE_MODE | MODE_TX);

  // wait for TX done
  while ((readRegister(REG_IRQ_FLAGS) & IRQ_TX_DONE_MASK) == 0) {
    //yield();
  }

  // clear IRQ's
  writeRegister(REG_IRQ_FLAGS, IRQ_TX_DONE_MASK);

  return 1;
}

Thanks and Regards,
WI

Similar issue in this thread Why isn't ESP8266 connecting to wifi when calling yield()? - Arduino Stack Exchange

I'm missing the link to the library you're using!

Before calling yield() in the LoRa library, if I call 'server.handleClient()' in an attempt to let WiFi do what it wants to do then the issue seems to be fixed.

I would have expected the yield() function to do that. It's necessary to call this function on the ESP8266 from time to time if you do lengthy task on it, so the loop() doesn't return often enough. According to the documentation it's responsible that all the code that handles WiFi and other hardware features is executed often enough to not let it starve.