From owner-freebsd-current@FreeBSD.ORG Mon Dec 29 10:05:07 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B8DC616A4CE; Mon, 29 Dec 2003 10:05:07 -0800 (PST) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 372E343D45; Mon, 29 Dec 2003 10:05:05 -0800 (PST) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id hBTI54iw016960; Mon, 29 Dec 2003 13:05:04 -0500 (EST) Date: Mon, 29 Dec 2003 13:05:04 -0500 (EST) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Alfred Perlstein In-Reply-To: <20031228181146.GR9623@elvis.mu.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: davidxu@freebsd.org cc: current@freebsd.org Subject: Re: debugging kse X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2003 18:05:07 -0000 On Sun, 28 Dec 2003, Alfred Perlstein wrote: > * Daniel Eischen [031228 10:02] wrote: > > > > I don't see why you want to emulate the windows API when it is > > much simpler to add in the necessary pthread bits when threads > > are enabled. I updated my patch to add in pthread support > > for webclient (see patch-ad): > > > > http://people.freebsd.org/~deischen/webstone.diffs > > > > I didn't add any of the necessary configure stuff that is > > in your patch. I also didn't add a synchronization point > > to start the client threads off and running. The fork() > > method didn't use any so I didn't see why using threads > > would be any different. I did join to the threads at > > the end, but even that isn't necessary since they will > > continue to run after the main thread ends (until the > > alarm goes off). > > There's a couple of reasons why I did what I did... > The configure stuff was so that I didn't stuff other > unix users (I want Mindcraft to take my diffs). I'd also like them to take my diffs for eliminating the TLS usage. That should allow it to work for all UN*X's with pthreads as well as Windows with threads. I think the TLS was added as an afterthought to make it work under Windows with threads instead of redesigning it a bit. Can you merge my changes into yours and see how it works? > And as far as syncing up with the other threads, I thought > the standard was that if the mian thread exited, then the > whole app exits, so you have to at least join... No, that shouldn't happen. > > I'm still not sure how to test this. Do I need a > > web server? > > Yes, just one on localhost. > > edit the: 'conf/testbed' file to your taste. and then copy one of > the 'conf/filelist.{whatever}' to 'conf/filelist' and make sure > those files are fetchable, then just run webstone. I manually ran my threaded version of webclient: webclient.threaded -w 10.0.0.6 -l 10 -n 5 -u /usr/local/webstone/conf/filelist and it worked fine. I am also able to interrupt it without hanging after the CTRL-C. -- Dan Eischen