Jquery: run two functions at the same time

I have two functions,
import() calls and runs a script in the background, this script takes a while.
updateStatus() gets the session variables set by the first script in order to keep status.

The goal here is to run the script that takes a while and get the session vars at the same time to keep an updated “progress” as the bigscript runs. Both functions work I know that, the problem is that the update script is halted when the the import script is ran.

The update script utilises “getJson” while I have tried using both “getJson” and “load” to run the import script. I have also switched the order in which the functions are called. (importStart is a global script var)

Can any one tell me why? Or have any other suggestions?

	$(document).ready(function(){
		setInterval(function() {
    			updateStatus();
		}, 3000);
		if(importStart != 1){
			import();
			importStart = 1;
		}
	});

Update

import(); is not actually named import();

javascript isn’t multithreaded, so you functions cannot run in the background.

what does your import function do? can you make it do short bursts of work… or if you are downloading data then do this asynchronously.