New Function implementation from worker thread branch.