Quote:
Originally Posted by Stefan
Well in that case it might a problem that your TStaticVar has no name... Would be good to check that. We are using tons of waitfors in other objects (database queries) and never had problems with that.
|
The TStaticVar has a name in the actual code.
e: This mimics exactly the problem I've been having:
PHP Code:
function onCreated() {
this.call = function () {
echo("before" SPC getcallstack().size()); // before 3
waitfor(this.name,"ignoreme",1); // equivalently, sleep(1);
echo("after" SPC getcallstack().size()); // after 1
return "test";
};
temp.a = new TStaticVar("A");
temp.a.call = function (caller) {
temp.resp = caller.call();
echo(temp.resp);
return temp.resp;
};
echo(temp.a.call(this));
}
However, I think this illustrates an even deeper problem:
PHP Code:
//#CLIENTSIDE
function onCreated() {
temp.b = new TStaticVar("B");
temp.b.call = function () {
echo("before" SPC getcallstack().size()); // before 2
sleep(1);
echo("after" SPC getcallstack().size()); // never gets executed...
return "test";
};
echo(temp.b.call());
}