Function is_pinned

fn is_pinned() -> bool

Returns true if the current thread is pinned.