Sets this to have actions pending.
If the pending flag is already set or this is closed, it will return false and set throws.
input stream
true if pending was previously unset and is now set.