class Tkrzw::Future

Future containing a status object and extra data. Future objects are made by methods of AsyncDBM. Every future object should be destroyed by the “destruct” method or the “get” method to free resources.

Public Instance Methods

destruct() click to toggle source

Releases the resource explicitly.

# File tkrzw.rb, line 212
def destruct()
  # (native code)
end
get() click to toggle source

Waits for the operation to be done and gets the result status.

  • @return The result status and extra data if any. The existence and the type of extra data depends on the operation which makes the future. For DBM#get, a tuple of the status and the retrieved value is returned. For DBM#set and DBM#remove, the status object itself is returned.

The internal resource is released by this method. “wait” and “get” cannot be called after calling this method.

# File tkrzw.rb, line 226
def get()
  # (native code)
end
inspect() click to toggle source

Returns a string representation of the object.

  • @return The string representation of the object.

# File tkrzw.rb, line 207
def inspect()
  # (native code)
end
to_s() click to toggle source

Returns a string representation of the content.

  • @return The string representation of the content.

# File tkrzw.rb, line 201
def to_s()
  # (native code)
end
wait(timeout=-1) click to toggle source

Waits for the operation to be done.

  • @param timeout The waiting time in seconds. If it is negative, no timeout is set.

  • @return True if the operation has done. False if timeout occurs.

# File tkrzw.rb, line 219
def wait(timeout=-1)
  # (native code)
end