TIP #178 Version 1.5: [info pid] and [info tid] Subcommands

This is not necessarily the current version of this TIP.


TIP:178
Title:[info pid] and [info tid] Subcommands
Version:$Revision: 1.5 $
Author:Joe Mistachkin <joe at mistachkin dot com>
State:Draft
Type:Project
Tcl-Version:8.5
Vote:Pending
Created:Sunday, 21 March 2004

Abstract

This TIP proposes two new info subcommands which are used to obtain the current process and thread identifiers.

Rationale

In certain types of applications, it is important to know what thread is currently executing. This is especially true for multithreaded applications or for scripts running in a threaded build of Tcl.

While the author realizes that there is already a pid command, the addition of the info pid subcommand still makes sense for the following reasons:

Proposed Change

Two new subcommands, info pid and info tid, would be added to the info command with the following syntax:

info pid

This subcommand would return the process identifier for the current process.

info tid

This subcommand would return the thread identifier for the current thread.

Draft Implmentation

A complete implementation of this TIP is available [1].

Copyright

This document has been placed in the public domain.


Powered by TclThis is not necessarily the current version of this TIP.

TIP AutoGenerator - written by Donal K. Fellows