Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 6 08:16:06 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id m96FG6jL023432 for ; Mon, 6 Oct 2008 08:16:06 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id m96FLsGx021040 for ; Mon, 6 Oct 2008 08:21:54 -0700 Message-Id: <200810061521.m96FLsGx021040@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding threads Date: Mon, 06 Oct 2008 08:21:54 -0700 From: Bill Cheng Someone wrote: > Quick question. > > If I have a thread for parsing the file (say fileparser()) and I > create the server and client threads at the end of fileparser( ) , > would the 2 child threads automatically get access to all the > variables parsed in their parent thread fileparser() ? I assume this is covered in CS 402, right? Threads within the same process share everything except the CPU registers and program stack. -- Bill Cheng // bill.cheng@usc.edu