% Interface for future for remote matlab invocation

% Copyright 2020 The MathWorks, Inc.

classdef (Abstract) AbstractRemoteFuture < handle
    
    methods (Abstract)
        % Wait for completion
        % This wait must be interruptible by Ctrl-C
        % checkFcn - Function handle to invoke periodically to break out of
        % wait. This method must return true to continue waiting, and false
        % otherwise. Alternately this function can error to pass
        % information out of the wait method.
        % return true if future completed or false if either timeout
        % reached or checkFcn returned false.
        completed = await(obj, checkFcn);
        
        % Get MATLAB result of method invocation
        % If this future is not completed, this will block until completed
        % If remote result is an error it should be thrown here
        result = getResult(obj);
        
        % Get MATLAB warnings of method invocation
        % If this future is not completed, this will block until completed
        warnings = getWarnings(obj);
    end
end
