daily pastebin goal
40%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var count = 0,
  2.     running = false,
  3.     iface = {};
  4.  
  5.  
  6. iface.run = function ()
  7. {
  8.     running = true;
  9.     while (running) {
  10.         count++;
  11.     }
  12. };
  13.  
  14.  
  15. iface.stop = function ()
  16. {
  17.     running = false;
  18. };
  19.  
  20.  
  21. onmessage = function (ev)
  22. {
  23.     var func_name = ev.data;
  24.     iface[func_name].apply();
  25. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top