Repository navigation
Expand file tree
/
Copy pathMultipleThreads.html
More file actions
38 lines (37 loc) · 1.71 KB
/
Copy pathMultipleThreads.html
File metadata and controls
38 lines (37 loc) · 1.71 KB
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
<html>
<head>
<title>Execution with Multiple threads</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="./index.css" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</head>
<body>
<div class="container">
<div class="jumbotron">
<h1>Web worker example with two threads</h1>
<p>Web Workers is a simple means for web content to run scripts in background threads. The worker thread can perform tasks without interfering with the user interface.A.</p>
</div>
<div class="row">
<div class="col-xs-6" style="height: 300px">
<div style="background-color: #5cb85c;" class="thread">
<center>Main Thread</center>
<button onclick="flip()">flip the card</button>
<section class="card-container">
<div class="card" onclick="flip()">
<div class="front">1</div>
<div class="back">2</div>
</div>
</section>
</div>
</div>
<div class="col-xs-6" style="height: 300px">
<div style="background-color: #f0ad4e;" class="thread">
<center>Worker Thread</center>
</div>
</div>
</div>
</div>
</body>
</html>