fix Processing deadlock, if threads cancel with an exception
refactored dataproviders, updated tests for dataproviders