Update throttling pattern (#1937)

* Create component.urm.puml

* Create App.java

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Create AppTest.java

* Add files via upload

* Update README.md

* Update README.md

* Update pom.xml

* Update App.java

* Update BjornGraphicsComponent.java

* Update BjornInputComponent.java

* Update BjornPhysicsComponent.java

* Update Component.java

* Update App.java

* Delete App.java

* Delete BjornGraphicsComponent.java

* Delete BjornInputComponent.java

* Delete BjornPhysicsComponent.java

* Delete Component.java

* Delete GameObject.java

* Delete GraphicsComponent.java

* Delete InputComponent.java

* Delete PhysicsComponent.java

* Create App.java

* Update App.java

* Update App.java

* Create BjornGraphicsComponent.java

* Create BjornInputComponent.java

* Create BjornPhysicsComponent.java

* Create Component.java

* Create GameObject.java

* Create GraphicsComponent.java

* Create InputComponent.java

* Create PhysicsComponent.java

* Delete AppTest.java

* Delete UpdateTest.java

* Create AppTest.java

* Create UpdateTest.java

* Update throttling pattern example

* delete unwanted files

Co-authored-by: YanchaoMiao <11710204@mail.sustech.edu.cn>
This commit is contained in:
Ilkka Seppälä
2022-01-07 09:46:59 +02:00
committed by GitHub
parent c66ca67201
commit 11f20593b2
8 changed files with 156 additions and 130 deletions

View File

@ -18,11 +18,11 @@ threads and eliminating the latency of creating new threads.
## Explanation
Real world example
Real-world example
> We have a large number of relatively short tasks at hand. We need to peel huge amounts of potatoes
> and serve mighty amount of coffee cups. Creating a new thread for each task would be a waste so we
> establish a thread pool.
> and serve a mighty amount of coffee cups. Creating a new thread for each task would be a waste so
> we establish a thread pool.
In plain words
@ -99,7 +99,7 @@ public class PotatoPeelingTask extends Task {
}
```
Next we present a runnable `Worker` class that the thread pool will utilize to handle all the potato
Next, we present a runnable `Worker` class that the thread pool will utilize to handle all the potato
peeling and coffee making.
```java