Cellular.getDataUsage is blocking application code for seconds at a time in multi threaded mode

Update:

I have found that blocking issues go down substantially if the modem’s data registers are queried at much faster frequency.

I modified above code to wait only 500 ms in between calls to Cellular.getDataUsage() and now it is only blocking for about 20 ms per call.

If the network connection is lost, then the first call to Cellular.getDataUsage() after the connection is re-established seems to work. Calling Cellular.getDataUsage() which Particle.connected() is FALSE seems to screw up the Electron connectivity process