<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Parrot - Represents a Parrot Thread.</title> <link rel="stylesheet" type="text/css" href="../../../resources/parrot.css" media="all"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <div id="wrapper"> <div id="header"> <a href="http://www.parrot.org"> <img border=0 src="../../../resources/parrot_logo.png" id="logo" alt="parrot"> </a> </div> <!-- "header" --> <div id="divider"></div> <div id="mainbody"> <div id="breadcrumb"> <a href="../../../html/index.html">Home</a> » <a href="../../../html/pmc.html">PMCs</a> » Represents a Parrot Thread. </div> <h1><a name="NAME" >NAME</a></h1> <p>src/pmc/parrotthread.pmc - Represents a Parrot Thread.</p> <h1><a name="DESCRIPTION" >DESCRIPTION</a></h1> <p>This type represents a parrot thread.</p> <p>It provides the following methods: - join - detach - kill - pid</p> <h2><a name="Methods" >Methods</a></h2> <dl> <dt><a name="void_init()" ><b><code>void init()</b></code></a></dt> Create a new, invalid handle to a running thread. <dt><a name="void_init_pmc(PMC_*notused)" ><b><code>void init_pmc(PMC *notused)</b></code></a></dt> Create a new, invalid handle to a running thread. <dt><a name="INTVAL_get_integer()" ><b><code>INTVAL get_integer()</b></code></a></dt> Return the thread ID of this thread. <dt><a name="METHOD_run(closure)" ><b><code>METHOD run(closure)</b></code></a></dt> Join the thread, returning whatever its main method returns. <dt><a name="METHOD_join()" ><b><code>METHOD join()</b></code></a></dt> Join the thread, returning whatever its main method returns. <dt><a name="METHOD_detach()" ><b><code>METHOD detach()</b></code></a></dt> Detach the thread so it cannot be joined and will free its resources immediately when it exits. <dt><a name="METHOD_kill()" ><b><code>METHOD kill()</b></code></a></dt> Terminate a running thread.</dl> </div> <!-- "mainbody" --> <div id="divider"></div> <div id="footer"> Copyright © 2002-2011, Parrot Foundation. </div> </div> <!-- "wrapper" --> </body> </html>