From: Eric Smith
Subject: LWW Threads
Date: 
Message-ID: <ceb68bd9.0206071943.76a96101@posting.google.com>
Someone who has a commercial version of LWW, what happens when you run
the following?

(defparameter *sevens* nil)
(defun 7func () (sleep 1) (push 7 *sevens*))
(loop repeat 1000 do (mp:process-run-function "7proc" nil #'7func))
(sleep 2)
(length *sevens*)

From: Christopher C Stacy
Subject: Re: LWW Threads
Date: 
Message-ID: <x8lvg8ucnp4.fsf@shell01.TheWorld.com>
>>>>> On 7 Jun 2002 20:43:38 -0700, Eric Smith ("Eric") writes:

 Eric> Someone who has a commercial version of LWW, 
 Eric> what happens when you run the following?

 Eric> (defparameter *sevens* nil)
 Eric> (defun 7func () (sleep 1) (push 7 *sevens*))
 Eric> (loop repeat 1000 do (mp:process-run-function "7proc" nil #'7func))
 Eric> (sleep 2)
 Eric> (length *sevens*)

I compiled it (wrapping the last three forms in a function).
On my very slow Pentium with 128 MB, NTS4, LWW 4.1, the function 
runs for 3809 seconds, creates about 1000 concurrent native threads
(up from 9) and about 2000 handles (up from 51), grows to over 110 MB
consuming all available memory, pretty much takes over the CPU but
doesn't respond (repaint or commands) to me, and returns the value 206.
Looking again some seconds later on, (LENGTH *SEVENS*) => 1000.

Asking for the LENGTH at an arbitrary point in the computation
is going to give you a random number, and when all the threads
return it will give you the length of all of the PUSH operations.

What does it do in the trial/educational/personal version of LWW?
What did you expect it to do?
From: Eric Smith
Subject: Re: LWW Threads
Date: 
Message-ID: <ceb68bd9.0206081529.1f05e73@posting.google.com>
Christopher C Stacy <······@shell01.TheWorld.com> wrote in message news:<···············@shell01.TheWorld.com>...

> What does it do in the trial/educational/personal version of LWW?
> What did you expect it to do?

It exceeds the heap limit.  I just wanted to know if it could run that
many threads.  It probably uses a big block of memory per thread for
stack space etc., which could explain why it seems to use so much
memory.
From: Alain Picard
Subject: Re: LWW Threads
Date: 
Message-ID: <86hekeqtm7.fsf@gondolin.local.net>
········@yahoo.com (Eric Smith) writes:

> Someone who has a commercial version of LWW, what happens when you run
> the following?
> 
> (defparameter *sevens* nil)
> (defun 7func () (sleep 1) (push 7 *sevens*))
> (loop repeat 1000 do (mp:process-run-function "7proc" nil #'7func))
> (sleep 2)
> (length *sevens*)

Pray tell: what do you suppose is the "correct" result for this code
to return?  And why?

FWIW, on my itty bitty celeron box, it returned 1000 a couple of
seconds later.  When I increased the number of iterations in the loop
to 10,000, LW/Linux trashed for a while until I got bored and nuked
it.