I need to do something like
while(thisIsNotDoneYet())
{
Thread.sleep(1000);
}
Mike Wannamaker
Jon
I don't think the timer will work, basically I was just wondering if someone clever out there had something like that, didn't think so.. Basically the code is as I said, however the call to
While(myObject.hasNotReturnedFromItsRPCCallYet())
{
pauseForABit();
}
Just didn't want to have to register another callback with myObject to do what I wanted to do after the pause(); no worries just as easy to do the callback.
Mike Wannamaker
Senior Software Developer
<script language="javascript">
<!--
function wait(millis)
{
var start = new Date();
var wait = true;
while (wait)
{
var end = new Date();
wait = ((start.getTime() + millis) >= end.getTime());
}
alert("done...");
}
-->
</script>
Imagine a method scoped @Blocking annotation. When the compiler find a
call to a @Blocking method, it can separate the invoker method in two
native functions. Code before the call is translated to an invoking
function, and code after call is translated to a callback.
A blocking system is possible or I'm wrong?
You should be shot.
NB: Because I will get flamed for this, let me be a bit more clear:
Tossing your javascript into an endless loop the way you're doing will
completely freeze out the browser and make your CPU hit the high end
of death valley temperatures in the dead of summer. This will in turn
cause notebooks to emulate a particularly eager vacuum cleaner whilst
simultaneously dropping the remaining juice from that poor poor
battery as fast as a gerbil tossed off the empire state.
In short, people the world over will be cussing at you for a long time
to come, and that might be construed as sufficient pain that you ought
to take a paintball right in the solar plexus.
HTH!
agreed with reiner ...
since my dear friend does make gwt devv a lil more interesting ...
only one correction here ->
> completely freeze out the browser and make your CPU hit the high end
> of death valley temperatures in the dead of summer.
u mean in the dead of *winter* ! :)
To know WHEN to use code like this is what will his project work as
expected or not.
And, by the way, I hope you certainly realize that making a threat via
the internet is a serious offense. Your opening line of "You should
be shot" I am sure was meant as nothing more than a simple attempt at
humor. If not, please enlighten me further...
Mike V.
On Mar 1, 5:00 pm, "Reinier Zwitserloot" <reini...@gmail.com> wrote:
> MikeViens:
NB: As I have an image to uphold, I certainly don't want to create the
impression that Mike's thinly veiled legal threat in any way or form
scared me. Rest assured that my reply has been sautéed with a number
of juicy remarks that would make a litigious bastard wet himself with
glee.
HTH!
> Reiner, by posting a code snippet to a forum does not result in
> everyone in the known IT world using it. The author asked for how to
> do something, so I provided it.
>
>if someone asks you for a rope so that he may hang himself, you hand
>it over too? Don't be an idiot. The code snippet you wrote is wrong to
>bloody wrong in all possible circumstances. It served to confuse and
>nothing more. Hopefully. The alternative is that that monstrous bit of
>duck vomit actually gets used, in which case you are personally
>responsible for a lot of grief.
>
>
>> And, by the way, I hope you certainly realize that making a threat via
>> the internet is a serious offense. Your opening line of "You should
>> be shot" I am sure was meant as nothing more than a simple attempt at
>> humor. If not, please enlighten me further...
>>
>
>Yes, of course, because making thinly veiled legal threats means you
>clearly have the moral high ground.
>
>Fortunately for me, I don't live in a country with inane litigious
>idiots.
>
>HTH!
Truly, classy and professional, Reinier. Thank you for your bizarre
opinion. As for "thinly veiled", make another and we shall see...
Regarding your "reputation to uphold", indeed you do have one. After
a very quick search, I found many other people that you have conversed
with, and I must say that you are consistent in your manner. I
believe you do have some valid points, but your approach is rude,
crass, and juvenile. But, that goes along with being only 25, doesn't
it? (No insult meant toward all 25 year olds...) I was there once,
and I thought I knew a lot, too. I think when you grow out of your
rebelious, angry stage, you may actually benefit the IT world. Until
then though, you are not helping anyone and are making quite a fool of
yourself, which you will probably regret as you mature.
BTW, you really make it very easy to find information about yourself,
don't you?
http://www.zwitserloot.com/
http://www.blogger.com/profile/13753148
Reinier Zwitserloot
Papsouwselaan 54
Delft
,2624EB
NL
Tel. +31.652391707