{"json_modified": "2016-01-30T09:58:57.747892", "slug": "Web/JavaScript/Reference/Objets_globaux/Atomics/compareExchange", "tags": ["M\u00e9moire partag\u00e9e", "M\u00e9thode", "Atomics", "Exp\u00e9rimental", "JavaScript"], "locale": "fr", "title": "Atomics.compareExchange()", "translations": [{"title": "Atomics.compareExchange()", "url": "/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics/compareExchange", "tags": ["Shared Memory", "Experimental", "Atomics", "Method", "JavaScript"], "summary": "The static Atomics
.compareExchange()
method exchanges a given replacement value at a given position in the array, and returns the old value at that position, if a given expected value equals the old value. This atomic operation guarantees that no other write happens until the modified value is written back.", "localization_tags": [], "locale": "en-US", "last_edit": "2016-01-28T11:35:48", "review_tags": []}], "modified": "2016-01-30T09:58:57", "label": "Atomics.compareExchange()", "localization_tags": [], "url": "/fr/docs/Web/JavaScript/Reference/Objets_globaux/Atomics/compareExchange", "last_edit": "2016-01-30T08:15:48", "summary": "La m\u00e9thode statique Atomics
.compareExchange()
\u00e9change une valeur d'un tableau \u00e0 un emplacement donn\u00e9 si la valeur qui \u00e9tait dans le tableau correspond \u00e0 une valeur donn\u00e9e. Cette op\u00e9ration atomique garantit qu'aucune autre op\u00e9ration d'\u00e9criture n'est appliqu\u00e9e tant que la valeur modifi\u00e9e n'est pas \u00e9crite.", "sections": [{"id": "Quick_Links", "title": null}, {"id": "Syntaxe", "title": "Syntaxe"}, {"id": "Param\u00e8tres", "title": "Param\u00e8tres"}, {"id": "Valeur_de_retour", "title": "Valeur de retour"}, {"id": "Exceptions_lev\u00e9es", "title": "Exceptions lev\u00e9es"}, {"id": "Exemples", "title": "Exemples"}, {"id": "Sp\u00e9cifications", "title": "Sp\u00e9cifications"}, {"id": "Compatibilit\u00e9_des_navigateurs", "title": "Compatibilit\u00e9 des navigateurs"}, {"id": "Voir_aussi", "title": "Voir aussi"}], "id": 173617, "review_tags": []}