# WAIT within a WARP block

I came across this combination while testing some clone logic.
I was creating clones and have them process at either "When I start as a clone" or "When I receive ___" blocks.
Also I placed some process completion counters for the clones within the WARP by using "when proc# < 1" type of code.
I noticed that if there is one of these WAITs within a WARP, almost nobody else gets any cycles.
I did not do this on purpose, but came across it while trying to speed things up with WARP blocks.
I did not test this with the older versions. But since there was some WARP speed-up in the v6 release, I wanted to share my experience, so others can be mindful of this.

The thing to do is definitely not have any conditional WAITs within the WARP.

Here is a demo code that grinds to a HALT and completes only after a veeerrryyy LooooNnnnnGgggg time, in my PC.

of course, the whole point of warp is to snatch all the cycles away and prioritize the warped thread over all others with a 500 msecs interval.

Absolutely!
I am not arguing, but I was thinking that there would "some" cycles enough for a modicum of progress left. It is more like almost NOTHING is left.

well, that's the downside of giving users / programmers control of such things, they can abuse it in ways that hardly make sense

IMHO a WAIT should turn off warp until the thread starts again. Even if it's WAIT 0 SECS, or rather especially then, because the user's clear intent is to let everyone run for one display cycle.

did you see the script in question? it's not a timed wait, but a conditional one.

No, I admit, I haven't read the project. But why does that matter? WAIT UNTIL could/should also turn off WARP, especially since many possible conditions can't be met if other threads aren't running.

@ bh. Thank you in a way!
I did not want to argue the merits of the design behind the curtain and kind of stayed quiet.
However, if one considers the steps a user goes thru developing a piece of a script (at least in my case), then it becomes clear that it is not always obvious that such "obviously wrong choice of blocks" should not have been used. (Wow, that was a mouthful !).

It is the simple act of placing a WARP block in an attempt to speed things that leads to such occurrences. In my case at least, I don't "THINK" about analyzing the block sequences before placing them into warp. I just do it to speed it up. When it collapses due to interdependencies of event block's, my first reaction is NOT "oh, I made a mistake", but rather "another weirdness about SNAP! It was working fine without the warp" - should I report it or not. Then the painful analysis of the various reactions have to be considered: stupidity, not knowing CS to a sufficent degree, not understanding the underlying design, being a user without a clue, ...etc.

Long story short, working with Snap is a love-hate relationship that one has to endure for the potentially pleasant results and accolades one might achieve. I guess there is a bit of S&M in some of us!

Oh dear. Is this a hypothetical worry, or have we actually responded that way? If I've done that, I really want to know about it. I'm sure the rest of us feel the same way.

Speaking now just for myself, I am just barely less ignorant of Snap! internals than the newest user. I have a good sense, I think, of the abstraction we want to present to users, but I have no clue, for example, exactly why the new Morphic is better than the old one. So if I'm ever arrogant toward users, that's unacceptable for two reasons.

Oh, looking back, I see this:

Is that what you meant? At least he did put a smiley...

I think that Jens thinks of you as a step above a generic user. So he expects you to interpret that as friendly, treating you like one of the gang. But I shouldn't speak for him. I'm sure he'll respond to this thread, maybe not today because his family has the strange idea that he should spend some time with them on the weekends.

@bh:
Please do not worry too much about what I have said. I have utmost respect for all the SNAP development team members. What you guys try to do and how you go about it speaks volumes about you than any one's comments, mine included. Once in a while, I spew out some subconscience thoughts, which I have to learn to better control. No harm done, all is well !
And here is my favorite emoticon:

Thanks!

Ugh, just noticed this. Hey, @tguneysu, I totally appreciate all your questions and findings! They are exactly the wonderful and useful feedback we look forward to receiving, because, how else would we ever make Snap better and get the bugs out. No, seriously, the smiley was indeed meant as a virtual pat on your shoulder, and yes, as Brian correctly muses, I do consider you to be part of our "core" gang. Thank you for all you've done and all you're going to help Snap!