Class FutureCallback


  • public class FutureCallback
    extends Object
    A callback which is called when a [`Future`] completes. Note that this MUST NOT call back into LDK directly, it must instead schedule actions to be taken later. Rust users should use the [`std::future::Future`] implementation for [`Future`] instead. Note that the [`std::future::Future`] implementation may only work for runtimes which schedule futures when they receive a wake, rather than immediately executing them.
    • Method Detail

      • destroy

        public void destroy()
        Destroys the object, freeing associated resources. After this call, any access to this object may result in a SEGFAULT or worse. You should generally NEVER call this method. You should let the garbage collector do this for you when it finalizes objects. However, it may be useful for types which represent locks and should be closed immediately to avoid holding locks until the GC runs.
      • call

        public void call()
        The method which is called.