aboutsummaryrefslogtreecommitdiff
path: root/files/ja/orphaned/web/api/navigatorconcurrenthardware/index.html
blob: 43e5ae19652b79b80f17c30002562dfb6893212d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
title: NavigatorConcurrentHardware
slug: orphaned/Web/API/NavigatorConcurrentHardware
tags:
  - API
  - Concurrency
  - HTML DOM
  - Interface
  - Navigator
  - NavigatorCPU
  - NavigatorConcurrentHardware
  - NeedsBrowserCompatibility
  - NeedsTranslation
  - Reference
  - Threading
  - Threads
  - TopicStub
  - WorkerNavigator
  - Workers
translation_of: Web/API/NavigatorConcurrentHardware
original_slug: Web/API/NavigatorConcurrentHardware
---
<p>{{APIRef("HTML DOM")}}</p>

<p>The <strong><code>NavigatorConcurrentHardware</code></strong> {{Glossary("mixin")}} adds to the {{domxref("Navigator")}} interface features which allow Web content to determine how many logical processors the user has available, in order to let content and Web apps optimize their operations to best take advantage of the user's CPU.</p>

<p>{{AvailableInWorkers}}</p>

<p>The number of <strong>logical processor cores</strong> is a way to measure the number of threads which can effectively be run at once without them having to share CPUs. Modern computers have multiple physical cores in their CPU (two or four cores is typical), but each physical core is also usually able to run more than one thread at a time using advanced scheduling techniques. So a four-core CPU may return 8. The browser may, however, choose to reduce the number in order to represent more accurately the number of {{domxref("Worker")}}s that can run at once</p>

<h2 id="Properties">Properties</h2>

<dl>
 <dt>{{domxref("NavigatorConcurrentHardware.hardwareConcurrency")}} {{readonlyinline}}</dt>
 <dd>Returns the number of logical processors which may be available to the user agent. This value is always at least 1, and will be 1 if the actual number of logical processors can't be determined.</dd>
</dl>

<h2 id="Methods">Methods</h2>

<p><em>The <code>NavigatorConcurrentHardware</code></em><em> mixin has no methods.</em></p>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('HTML WHATWG', '#navigatorconcurrenthardware', 'NavigatorConcurrentHardware')}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>



<p>{{Compat("api.NavigatorConcurrentHardware")}}</p>

<h2 id="See_also">See also</h2>

<ul>
 <li>{{domxref("Navigator")}}</li>
 <li>{{domxref("WorkerNavigator")}}</li>
</ul>