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
Releases the resource explicitly.
# File tkrzw.rb, line 240 def destruct() # (native code) end
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. ForDBM#set
andDBM#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 254 def get() # (native code) end
Returns a string representation of the object.
-
@return The string representation of the object.
# File tkrzw.rb, line 235 def inspect() # (native code) end
Returns a string representation of the content.
-
@return The string representation of the content.
# File tkrzw.rb, line 229 def to_s() # (native code) end
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 247 def wait(timeout=-1) # (native code) end