{"json_modified": "2016-10-24T04:31:13.902363", "uuid": "f9c982eb-817b-48e9-a64d-ff25af1b8daf", "title": "Usando web workers", "url": "/es/docs/Web/Guide/Performance/Usando_web_workers", "tags": [], "translations": [{"uuid": "adf074f1-3905-408b-a130-85e40c6d58ea", "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": "2016-10-05T18:53:24", "review_tags": []}, {"uuid": "96f49fd9-45e8-41aa-a784-e897124a76b8", "title": "Utilisation des web workers", "url": "/fr/docs/Utilisation_des_web_workers", "tags": ["Workers", "Firefox", "Gecko 1.9.1", "HTML5"], "summary": "Les Web Workers permettent d'ex\u00e9cuter du code en t\u00e2che de fond. Une fois cr\u00e9\u00e9, un worker peut envoyer des messages \u00e0 son processus parent en envoyant des messages qui seront r\u00e9ceptionn\u00e9s par un gestionnaire d'\u00e9v\u00e9nement sp\u00e9cifi\u00e9 \u00e0 la cr\u00e9ation.", "localization_tags": ["inprogress"], "locale": "fr", "last_edit": "2016-07-15T13:29:07", "review_tags": ["editorial"]}, {"uuid": "7d7e6085-eb87-43df-bde0-b09fe6c045d1", "title": "Web Worker \u3092\u4f7f\u7528\u3059\u308b", "url": "/ja/docs/Web/API/Web_Workers_API/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": "2016-01-06T10:23:47", "review_tags": []}, {"uuid": "ece74953-a536-48d2-b672-46150d988b52", "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": "2016-10-11T20:12:11", "review_tags": []}, {"uuid": "9f2e1780-f20d-425e-a850-d996b4a0812f", "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": []}, {"uuid": "e0d662be-454f-4660-8331-f629b1fef0b3", "title": "U\u017cycie web workers", "url": "/pl/docs/Web/Guide/Performance/Uzycie_web_workers", "tags": [], "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).", "localization_tags": ["inprogress"], "locale": "pl", "last_edit": "2015-11-17T01:48:06", "review_tags": []}, {"uuid": "8ebdf882-d891-466e-8be8-f4cb112343df", "title": "\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Web Workers", "url": "/ru/docs/DOM/Using_web_workers", "tags": ["\u043f\u043e\u0442\u043e\u043a", "\u0432\u043e\u0440\u043a\u0435\u0440"], "summary": "Worker - \u044d\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Worker()
), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 JavaScript \u0444\u0430\u0439\u043b \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u2014 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0432 \u043f\u043e\u0442\u043e\u043a\u0435 Worker'\u0430; \u043e\u0431\u044a\u0435\u043a\u0442\u044b Workers \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e window
. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 window
\u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 (\u0432\u043c\u0435\u0441\u0442\u043e self
) \u0432\u043d\u0443\u0442\u0440\u0438 Worker
\u0432\u0435\u0440\u043d\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443.", "localization_tags": ["inprogress"], "locale": "ru", "last_edit": "2016-09-16T17:23:08", "review_tags": []}, {"uuid": "23d8801a-c411-4189-92f7-41a36481f30a", "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": []}, {"uuid": "7c59e448-088e-4ac7-bc82-7ae8451231cc", "title": "\u4f7f\u7528 Web Workers", "url": "/zh-TW/docs/Web/API/Web_Workers_API/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": "2016-06-21T00:01:31", "review_tags": []}], "modified": "2016-10-24T04:31:12", "label": "Usando web workers", "localization_tags": ["inprogress"], "locale": "es", "id": 88481, "last_edit": "2016-10-24T04:31:00", "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.", "sections": [{"id": "Acerca_de_seguridad_de_hilos", "title": "Acerca de seguridad de hilos"}, {"id": "Pasando_datos", "title": "Pasando datos"}, {"id": "Ejemplos_pasando_datos", "title": "Ejemplos pasando\u00a0datos"}, {"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": "Pasando_datos_mediante_transferencia_de_propiedades_(objetos_transferibles)", "title": "Pasando\u00a0datos\u00a0mediante\u00a0transferencia\u00a0de\u00a0propiedades\u00a0(objetos\u00a0transferibles)"}, {"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"}], "slug": "Web/Guide/Performance/Usando_web_workers", "review_tags": []}