Need urgent help: When calling some data using third party API, the camera frame freezes

I am working on Unity project solution where we need to get some data from third party API to display on the screen. Whereas we are also scanning the environment with camera to do a arRaycastManager.Raycast.
Currently the camera screen freezes when the data is getting fetched. The data fetching takes 7 sec during which the camera freezes. Following are the queries on this -

  1. How to avoid camera screen freezing during the data fetch.
  2. How to make data fetch a different thread which doesn’t stop the scanning of environment with camera to do a arRaycastManager.Raycast. We need to have two parallel threads not affecting each other and have them work at same time.

We have added data fetch in one StartCoroutine and added arRaycastManager.Raycast in one StartCoroutine. But still it is not working as different thread.

Please let me know.

Unity coroutines are all single-threaded. If you want something to run on a worker thread, you’ll have to create it explicitly. (Unity has a “job” system that uses multiple threads, but I think it is highly problematic and don’t recommend using it.)