If you are blocking loop you can call it during your other lengthy operations.
However you should also consider why you are blocking loop for that long and possibly restructure to use a finite state machine or worker thread instead.
Nothing blocking per se, it's just that my sensor sampling routine takes 150 seconds to complete. Then cloud upload adds more time. And so on. Just want to make sure I use the best practice.
Generally speaking I would use a worker thread for long sensing operations like that. The thread should only do the sensing and calculations; do the publish and other cloud operations in a separate thread or the loop thread.
@wineisgud4u if you go the worker thread way mentioned above, have in mind that this singleton generator page can generate ultra useful code for a worker thread (with a singleton pattern included). Give it a shot, you won't regret.