rename wait to pending

“pending’ is more commonly used in other projects and literature to
refer to a state where a value is undefined but will be resolved at a
later time