adding threading to emage and pointstream in the test main