updated predicate barrier to expect the passed predicate function to return a promise instead of a boolean.