aspose file tools*
The moose likes Threads and Synchronization and the fly likes Threads based proj. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Threads based proj." Watch "Threads based proj." New topic
Author

Threads based proj.

Waez Ali
Ranch Hand

Joined: Jan 24, 2005
Posts: 43
Guys,

I have studied threads but I want to develop one small project to really get clear picture of apis and how it works.

If you know any sources/links/ or you would propose any small proj that I can develop in multithreads.. it would be really helpful.

Thank You
Emanuel Kadziela
Ranch Hand

Joined: Mar 24, 2005
Posts: 186
Incrementing a counter is always a good multithreaded problem. You can try something like this: Have a global counter and n threads which increment it in a thread safe way. Each of the n threads should increment the counter x number of times with x>1. Whenever the counter is incremented, the thread doing the increment should print out its name, the value before and the value after.

If you want bonus difficulty, ensure that no thread increments the counter more than once more than any other thread - in other words, every thread gets to increment before any other thread goes again.
Waez Ali
Ranch Hand

Joined: Jan 24, 2005
Posts: 43
Thanks I will try this out... please let me know any other interesting assignments.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Threads based proj.
 
Similar Threads
question and sample problem about classpath
Thread
Struggling with career startup please advice
CruiseControl: force building project #2 programaticaly from another project #1
need help on good multithreading practices