%ThreadWorker Class for thread-based workers
%   Worker objects contain information about the MATLAB worker.

% Copyright 2019 The MathWorks, Inc.

classdef ThreadWorker < handle
    properties ( SetAccess = immutable )
        %Host Host where the worker process executed a task
        Host
        
        %ComputerType Type of computer on the worker
        %   This property has the value of the MATLAB function COMPUTER
        %   executed on the worker.
        ComputerType
    end
    
    % Private constructor for static hidden build
    methods (Access = private)
        function obj = ThreadWorker()
            obj.Host         = 'localhost';
            obj.ComputerType = computer;
        end
    end
    
    methods (Static, Hidden)
        function obj = hBuild()
            obj = parallel.ThreadWorker;
        end
    end
end
