def connect(&block)
      Torque.lib = lib.join('libtorque.so')
      cid = Torque.pbs_connect(host)
      Torque.raise_error(cid.abs) if cid < 0  # raise error if negative connection id
      begin
        value = yield cid
      ensure
        Torque.pbs_disconnect(cid)            # always close connection
      end
      Torque.check_for_error                  # check for errors at end
      value
    end
def connect(&block)
      Torque.lib = lib.join('libtorque.so')
      cid = Torque.pbs_connect(host)
      Torque.raise_error(cid.abs) if cid < 0  # raise error if negative connection id
      begin
        value = yield cid
      ensure
        Torque.pbs_disconnect(cid)            # always close connection
      end
      Torque.check_for_error                  # check for errors at end
      value
    end
The comparison operator
 @param other [#to_h] batch server to compare against
 @return [Boolean] how batch servers compare
 Checks whether two batch server objects are completely identical to each
 other
 @param other [Batch] batch server to compare against
 @return [Boolean] whether same objects
 Generates a hash value for this object
 @return [Fixnum] hash value of object
 Creates a connection to batch server and calls block in context of this
 connection
 @yieldparam cid [Fixnum] connection id from established batch server connection
 @yieldreturn the final value of the block