On Mon, May 19, 2014 at 10:01 AM, Steve Wampler <[email protected]> wrote:
> > The obvious solution would be to lose the "(GEN) do" but then only ONE
> THREAD
> > GETS CREATED !
>
> Yep - that's expected.
Bob,
This happens because of the fact that thread/create have their own
evaluation context. Let me explain:
We know that
every i:=1 to 10 do foo(i)
is equivalent to
every foo(1 to 10)
Every forces the expression (1 to 10) to generate all of the results But:
every i:=1 to 10 do thread foo(i)
is NOT equivalent to
every thread foo( 1 to 10)
in the second case, you are only asking to create one thread! (1 to 10) is
not going to force a backtrack to beginning (thread). Furthermore,
because the expression (1 to 10) falls within the thread (or
co-expression) context. The expression is not evaluated as part of the
"every" statement, but delayed and evaluated as part of the newly created
thread/co-expression. In other words: "every" is blind when it comes to
the expression under the thread, it only sees the expression as "thread
expr" without evaluating expr itself. This is a property of
co-expression/threads in Unicon, it is part of their design.
Cheers,
Jafar
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Unicon-group mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unicon-group