this appears to be working with using pthread* instead of spthread*