/// Create a task that is a member of an existing thread group.
///
/// The task is added to |self.thread_group|.
///
/// This function creates an underlying Zircon thread to run the new
/// task.
Create a task that is a member of an existing thread group.
The task is added to |self.thread_group|.

This function creates an underlying Zircon thread to run the new
task.
Create a task that is a member of an existing thread group . The task is added to |self . thread_group| . This function creates an underlying Zircon thread to run the new task .
pub fn create_thread(
        &self,
        files: Arc<FdTable>,
        fs: Arc<FsContext>,
        signal_actions: Arc<SignalActions>,
        creds: Credentials,
    ) -> Result<CurrentTask, Errno> {
        let thread = self
            .thread_group
            .process
            .create_thread(self.command.read().as_bytes())
            .map_err(|status| from_status_like_fdio!(status))?;
        let mut pids = self.thread_group.kernel.pids.write();
        let id = pids.allocate_pid();
        let task = Self::new(
            id,
            self.command.read().clone(),
            self.executable_node.read().clone(),
            Arc::clone(&self.thread_group),
            self.parent,
            thread,
            files,
            Arc::clone(&self.mm),
            fs,
            signal_actions,
            creds,
            Arc::clone(&self.abstract_socket_namespace),
            ShellJobControl::new(self.shell_job_control.sid),
            None,
        );
        pids.add_task(&task.task);
        self.thread_group.add(&task.task);
        Ok(task)
    }
pub fn create_thread ( & self , files : Arc < FdTable > , fs : Arc < FsContext > , signal_actions : Arc < SignalActions > , creds : Credentials , ) -> Result < CurrentTask , Errno > { let thread = self . thread_group . process . create_thread ( self . command . read ( ) . as_bytes ( ) ) . map_err ( | status | from_status_like_fdio ! ( status ) ) ? ; let mut pids = self . thread_group . kernel . pids . write ( ) ; let id = pids . allocate_pid ( ) ; let task = Self :: new ( id , self . command . read ( ) . clone ( ) , self . executable_node . read ( ) . clone ( ) , Arc :: clone ( & self . thread_group ) , self . parent , thread , files , Arc :: clone ( & self . mm ) , fs , signal_actions , creds , Arc :: clone ( & self . abstract_socket_namespace ) , ShellJobControl :: new ( self . shell_job_control . sid ) , None , ) ; pids . add_task ( & task . task ) ; self . thread_group . add ( & task . task ) ; Ok ( task ) }
Create a task that is a member of an existing thread group.
Create a task that is a member of an existing thread group .
&self
files
Arc<FdTable>
fs
Arc<FsContext>
signal_actions
Arc<SignalActions>
creds
Credentials