public Context GetThread() { if( var.type != VarType.Thread ) throw new SGSException( RC.EINVAL, "Variable is not a thread" ); return Engine.GetCtx( var.data.T ); }