Skip to content

This repo demonstrates how to use Java threads to run multiple tasks in parallel

Notifications You must be signed in to change notification settings

aenesgur/java-threads-voting-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Java Threads Example

This repo demonstrates how to use Java threads to run multiple tasks in parallel.

Voting for the best design

In this situation, we are implementing a polling system where candidates can vote for their favourite design. For this polling system we implement two runnables. One runnable to simulate voting, and one for counting. Each design will have a thread to deal with voting, and a thread to deal with counting.

Votes are given out randomly between 0-5s. The counting thread will report results in 2s intervals.

About

This repo demonstrates how to use Java threads to run multiple tasks in parallel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages