Results for: "partition"

Returns true if this monitor is locked by any thread

Returns true if this monitor is locked by current thread.

Creates a new MonitorMixin::ConditionVariable associated with the receiver.

See Mutex#synchronize

No documentation available
No documentation available
No documentation available
No documentation available

The iterator version of the tsort method. obj.tsort_each is similar to obj.tsort.each, but modification of obj during the iteration may lead to unexpected results.

tsort_each returns nil. If there is a cycle, TSort::Cyclic is raised.

class G
  include TSort
  def initialize(g)
    @g = g
  end
  def tsort_each_child(n, &b) @g[n].each(&b) end
  def tsort_each_node(&b) @g.each_key(&b) end
end

graph = G.new({1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]})
graph.tsort_each {|n| p n }
#=> 4
#   2
#   3
#   1

The iterator version of the TSort.tsort method.

The graph is represented by each_node and each_child. each_node should have call method which yields for each node in the graph. each_child should have call method which takes a node argument and yields for each child node.

g = {1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]}
each_node = lambda {|&b| g.each_key(&b) }
each_child = lambda {|n, &b| g[n].each(&b) }
TSort.tsort_each(each_node, each_child) {|n| p n }
#=> 4
#   2
#   3
#   1

Sets the minimum and maximum supported protocol versions. See min_version= and max_version=.

No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available

Determines whether the given ‘requirement` is satisfied by the given `spec`, in the context of the current `activated` dependency graph.

@param [Object] requirement @param [DependencyGraph] activated the current dependency graph in the

resolution process.

@param [Object] spec @return [Boolean] whether ‘requirement` is satisfied by `spec` in the

context of the current `activated` dependency graph.

Initiates an SSL/TLS handshake with a server. The handshake may be started after unencrypted data has been sent over the socket.

Writes string to the SSL connection.

The X509 certificate for this socket endpoint.

Returns an Array of SingleResponse for this BasicResponse.

Encodes this DH to its PEM encoding. Note that any existing per-session public/private keys will not get encoded, just the Diffie-Hellman parameters will be encoded.

Encodes this DSA to its PEM encoding.

Parameters

Examples

DSA.to_pem -> aString
DSA.to_pem(cipher, 'mypassword') -> aString
Search took: 5ms  ·  Total Results: 3090