Skip to content

This project is about Thread. I used lock, unlock, conditon, await, sleep and more...

Notifications You must be signed in to change notification settings

Harelazimtas/Thread_Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Thread_Java

This project is about Thread. I used lock, unlock, conditon, await, sleep and more...

Factorial

Calculate rally using 3 ways:

One way through a loop. Second way through creating two threads. Third way through Fork Join.

Lock and Condition

The maximum amount of money in the account is 50.
We want to implement pull and deposit actions using Threads.
Pull and deposit were made under 2 Lock and 2 under two conditions.
So that each pull does not reach the minus, and each deposit does not exceed the maximum amount that can be stored.
UML

Dead Lock

The program runs two threads.
This creates a situation that each thread is waiting to hold a lock that the other hold and does not release.
So the program stuck.

About

This project is about Thread. I used lock, unlock, conditon, await, sleep and more...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages