Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/dom/workers/test/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 862 B image not shown  

Quelle  worker_suspended.js

  Sprache: JAVA
 

var count = 0;

function do_magic(data) {
  caches
    .open("test")
    .then(function (cache) {
      return cache.put(
        "http://mochi.test:888/foo",
        new Response(data.type + "-" + count++)
      );
    })
    .then(function () {
      if (count == 1) {
        postMessage("ready");
      }

      if (data.loop) {
        setTimeout(function () {
          do_magic(data);
        }, 500);
      }
    });
}

onmessage = function (e) {
  if (e.data.type == "page1") {
    if (e.data.count > 0) {
      var a = new Worker("worker_suspended.js");
      a.postMessage({ type: "page1", count: e.data - 1 });
      a.onmessage = function () {
        postMessage("ready");
      };
    } else {
      do_magic({ type: e.data.type, loop: true });
    }
  } else if (e.data.type == "page2") {
    do_magic({ type: e.data.type, loop: false });
  }
};

Messung V0.5 in Prozent
C=98 H=100 G=98

¤ Dauer der Verarbeitung: 0.16 Sekunden  (vorverarbeitet am  2026-08-24) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.