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