{"json_modified": "2015-11-17T01:48:13.495907", "slug": "Web/Guide/Performance/Uzycie_web_workers", "tags": [], "locale": "pl", "title": "U\u017cycie web workers", "translations": [{"title": "Utilisation des web workers", "url": "/fr/docs/Utilisation_des_web_workers", "tags": ["Workers", "Firefox", "Gecko 1.9.1", "HTML5"], "summary": "", "localization_tags": ["inprogress"], "locale": "fr", "last_edit": "2015-08-24T03:51:08", "review_tags": []}, {"title": "Using Web Workers", "url": "/en-US/docs/Web/API/Web_Workers_API/Using_web_workers", "tags": ["Workers", "Firefox", "Guide", "JavaScript", "HTML5", "Advanced"], "summary": "A worker is an object created using a constructor (e.g. Worker()
) that runs a named JavaScript file \u2014 this file contains the code that will run in the worker thread; workers run in another global context that is different from the current window
. Thus, using the window
shortcut to get the current global scope (instead of self
) within a Worker
will return an error.", "localization_tags": [], "locale": "en-US", "last_edit": "2015-11-11T11:29:34", "review_tags": []}, {"title": "Web Worker \u3092\u4f7f\u7528\u3059\u308b", "url": "/ja/docs/Web/Guide/Performance/Using_web_workers", "tags": ["Workers", "Firefox", "Guide", "JavaScript", "HTML5", "Advanced"], "summary": "Worker \u306f\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf (\u4f8b\u3048\u3070 Worker()
) \u3092\u4f7f\u7528\u3057\u3066\u751f\u6210\u3055\u308c\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3042\u308a\u3001\u540d\u524d\u4ed8\u304d\u306e JavaScript \u30d5\u30a1\u30a4\u30eb (\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f Worker \u30b9\u30ec\u30c3\u30c9\u3067\u5b9f\u884c\u3059\u308b\u30b3\u30fc\u30c9\u3092\u6301\u3061\u307e\u3059) \u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u307e\u305f Worker \u306f\u3001\u30ab\u30ec\u30f3\u30c8\u306e window
\u3068\u306f\u7570\u306a\u308b\u30b0\u30ed\u30fc\u30d0\u30eb\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3067\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\u5f93\u3063\u3066\u3001Worker
\u5185\u3067\u30ab\u30ec\u30f3\u30c8\u306e\u30b0\u30ed\u30fc\u30d0\u30eb\u30b9\u30b3\u30fc\u30d7\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b (self
\u306e\u4ee3\u308f\u308a\u306b) window
\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3082\u3001\u30a8\u30e9\u30fc\u304c\u8fd4\u308a\u307e\u3059\u3002", "localization_tags": [], "locale": "ja", "last_edit": "2015-06-26T08:40:42", "review_tags": []}, {"title": "Gebruik DOM workers", "url": "/nl/docs/Gebruik_maken_van_DOM_workers", "tags": ["HeeftTaalgebruikHerzieningNodig"], "summary": "DOM workers maken het mogelijk voor web content om scripts in achtergrond threads uit te voeren. Zodra een worker aangemaakt is kan deze thread berichten sturen door middel van een event handler, die gespecificeerd is door de maker.", "localization_tags": [], "locale": "nl", "last_edit": "2014-05-26T01:58:57", "review_tags": []}, {"title": "Using web workers", "url": "/ru/docs/DOM/Using_web_workers", "tags": [], "summary": "Dedicated Web Workers provide a simple means for web content to run scripts in background threads.\u00a0 Once created, a worker can send messages to the spawning task by posting messages to an event handler specified by the creator.", "localization_tags": [], "locale": "ru", "last_edit": "2014-02-18T10:51:50", "review_tags": []}, {"title": "\u4f7f\u7528 Web Workers", "url": "/zh-CN/docs/Web/API/Web_Workers_API/Using_web_workers", "tags": [], "summary": "\u4e13\u7528 Web Worker (Dedicated Web Worker) \u63d0\u4f9b\u4e86\u4e00\u4e2a\u7b80\u5355\u7684\u65b9\u6cd5\u4f7f\u5f97 web \u5185\u5bb9\u80fd\u591f\u5728\u540e\u53f0\u8fd0\u884c\u811a\u672c\u3002\u4e00\u65e6 worker \u521b\u5efa\u540e\uff0c\u5b83\u53ef\u4ee5\u5411\u7531\u5b83\u7684\u521b\u5efa\u8005\u6307\u5b9a\u7684\u4e8b\u4ef6\u76d1\u542c\u51fd\u6570\u4f20\u9012\u6d88\u606f\uff0c\u8fd9\u6837\u8be5 worker \u751f\u6210\u7684\u6240\u6709\u4efb\u52a1\u5c31\u90fd\u4f1a\u63a5\u6536\u5230\u8fd9\u4e9b\u6d88\u606f\u3002", "localization_tags": [], "locale": "zh-CN", "last_edit": "2015-04-17T15:00:39", "review_tags": []}, {"title": "\u4f7f\u7528 web workers", "url": "/zh-TW/docs/Web/Guide/Performance/Using_web_workers", "tags": [], "summary": "\u900f\u904e worker \u5efa\u69cb\u5b50 (\u5982 Worker()
) \u4fbf\u53ef\u4ee5\u7522\u751f worker \u7269\u4ef6\uff0c\u4e26\u4e14\u57f7\u884c JavaScript \u6a94\u6848\u3002\u5728 worker \u4e2d\u7684 JavaScript \u904b\u884c\u5728\u4e0d\u540c\u65bc window
\u7684\u57f7\u884c\u7dd2\u74b0\u5883\uff0c\u6240\u4ee5\u5728 worker \u4e2d\u5b58\u53d6\u5168\u57df\u7269\u4ef6\u61c9\u8a72\u8981\u900f\u904e self
\uff0c\u5982\u679c\u900f\u904e window
\u6703\u5c0e\u81f4\u932f\u8aa4\u767c\u751f\u3002", "localization_tags": [], "locale": "zh-TW", "last_edit": "2015-09-08T03:45:56", "review_tags": []}, {"title": "Usando web workers", "url": "/es/docs/Web/Guide/Performance/Usando_web_workers", "tags": [], "summary": "Los Web Workers dedicados proveen un medio sencillo para que el contenido web ejecute scripts en hilos en segundo plano. Una vez creado, un worker puede enviar mensajes a la tarea creada mediante envio de\u00a0mensajes al manejador de eventos especificado por el creador.", "localization_tags": [], "locale": "es", "last_edit": "2015-03-26T01:01:14", "review_tags": []}, {"title": "\uc6f9\uc6cc\ucee4 \uc0ac\uc6a9\ud558\uae30", "url": "/ko/docs/Web/API/Web_Workers_API/basic_usage", "tags": [], "summary": "A dedicated worker is only accessible from the script that first spawned it, whereas a shared workers can be accessed from multiple scripts.", "localization_tags": ["inprogress"], "locale": "ko", "last_edit": "2015-01-05T20:29:11", "review_tags": []}], "modified": "2015-11-17T01:48:11", "label": "U\u017cycie web workers", "localization_tags": ["inprogress"], "url": "/pl/docs/Web/Guide/Performance/Uzycie_web_workers", "last_edit": "2015-11-17T01:48:06", "summary": "Dedykowane w\u0105tki robocze\u00a0(Web Workers)\u00a0zapewniaj\u0105 prosty spos\u00f3b na uruchamiania skrypt\u00f3w w postaci w\u0105tk\u00f3w w tle tre\u015bci internetowych. Po utworzeniu, w\u0105tek roboczy mo\u017ce przekazywa\u0107 informacje do mened\u017cera zada\u0144, poprzez wysy\u0142anie wiadomo\u015bci do procesu obs\u0142ugi zdarze\u0144, okre\u015blonego przez tw\u00f3rc\u0119. Jednak dzia\u0142aj\u0105 one w kontek\u015bcie globalnym, kt\u00f3ry r\u00f3\u017cni si\u0119 od kontekstu bie\u017c\u0105cego okna (wywo\u0142ywanego za pomoc\u0105 skr\u00f3tu window
, zamiast self
, dlatego pr\u00f3ba otrzymania obecnego zakresu globalnego komend\u0105 Worker
zwr\u00f3ci b\u0142\u0105d).", "sections": [{"id": "O_bezpiecze\u0144stwie_w\u0105tk\u00f3w", "title": "O bezpiecze\u0144stwie w\u0105tk\u00f3w"}, {"id": "Mno\u017cenie_w\u0105tk\u00f3w", "title": "Mno\u017cenie w\u0105tk\u00f3w"}, {"id": "Przekazywanie_danych", "title": "Przekazywanie danych"}, {"id": "Przyk\u0142ady_przekazywania_danych", "title": "Przyk\u0142ady przekazywania danych"}, {"id": "Example_1_Create_a_generic_asynchronous_eval()", "title": "Example #1: Create a generic \"asynchronous "}, {"id": "Example_2_Advanced_passing_JSON_Data_and_creating_a_switching_system", "title": "Example #2: Advanced passing JSON Data and creating a switching system"}, {"id": "Przekazywanie_danych_przez_przeniesienie_w\u0142asno\u015bci_(transferable_objects)", "title": "Przekazywanie danych przez przeniesienie w\u0142asno\u015bci (transferable objects)"}, {"id": "Spawning_subworkers", "title": "Spawning subworkers"}, {"id": "Embedded_workers", "title": "Embedded workers"}, {"id": "Timeouts_and_intervals", "title": "Timeouts and intervals"}, {"id": "Terminating_a_worker", "title": "Terminating a worker"}, {"id": "Handling_errors", "title": "Handling errors"}, {"id": "Accessing_the_navigator_object", "title": "Accessing the navigator object"}, {"id": "Importing_scripts_and_libraries", "title": "Importing scripts and libraries"}, {"id": "Examples", "title": "Examples"}, {"id": "Performing_computations_in_the_background", "title": "Performing computations in the background"}, {"id": "The_JavaScript_code", "title": "The JavaScript code"}, {"id": "The_HTML_code", "title": "The HTML\u00a0code"}, {"id": "Performing_web_IO_in_the_background", "title": "Performing web I/O in the background"}, {"id": "Dividing_tasks_among_multiple_workers", "title": "Dividing tasks among multiple workers"}, {"id": "Creating_workers_from_within_workers", "title": "Creating workers from within workers"}, {"id": "Browser_Compatibility", "title": "Browser compatibility"}, {"id": "See_also", "title": "See also"}], "id": 125547, "review_tags": []}