LinkIt Bluetooth blocks for long time waiting for connection

This is part of the sample code for Bluetooth inside loop()

if(!LBTServer.connected())
{
// waiting for Spp Client to connect
bool connected = LBTServer.accept(20); <<<<<<<<<< block here for 20sec waiting for connection

This is not very useful as loop() is supposed to run often (very often) to do all the tasks the board have been programmed for controlling motor speed, position etc.

But the LBTServer.accept(20) stops the loop running for 20 seconds. This is unacceptable.

Can you change the library to match the Arduino ethernet library with
Server.available() returning an object when a bluetooth client connects.
i.e. make LBTServer.begin() start a back ground thread waiting for connections and then return the object when LBTServer.available() called.

hi, thanks for your suggestion, we had already put your idea to our todo list, we will try our best to modify the library in the next version.

In the mean time I am using accept(1)
i.e. 1sec delay per loop. Still tooo loooong but better then 20sec.
seems to work.