954,190 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

HELP for threads

i am new at using threads
can any one send me any program for using multithreads?

s_khardenavis
Newbie Poster
3 posts since Dec 2006
Reputation Points: 10
Solved Threads: 0
 

Get yourself a good book, and start reading.
Here's an excellent one (in fact one of the very few really good books about it): http://www.bookpool.com/sm/0321349601

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

I have Deitel &Deitel book JAVA How to Program 6th edition happy with it. Also cover threads and I got more out of it then from my teach at university(he just love to complain about java)

peter_budo
Code tags enforcer
Moderator
15,433 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 901
 

The things taught about multithreading in non-dedicated books (and some dedicated books) are either overly simplified (often to the point of being dangerous when applied to real scenarios) or dead wrong (because the authors themselves didn't understand the topic).

As a result a lot of multithreaded code will work, usually, but only on a single CPU machine where there will never be multiple threads executing in parallel.
When run on a multicore or multiCPU machine they far more quickly run into trouble.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

interesting I never thought of it. Yes we learn that mulithreading is design to speed up work especialy on multicore machines, but us non of has had chance to run pc with more then one cpu we don't give consideration to it. Will write to Santa get me new pc then...

peter_budo
Code tags enforcer
Moderator
15,433 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 901
 

Check the library, I just got a book from there and so far its pretty good.

"Java Threads, 3rd edition" - O'Reilly

Phaelax
Practically a Posting Shark
858 posts since Mar 2004
Reputation Points: 92
Solved Threads: 51
 

It's overall pretty good (and I do have it), but I've heard that there are problems with parts of it.
You should IMO never rely on a single source of information anyway (easier said than done I know, especially if you're on a tight budget).

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

I happen to have a dual cpu athlon system, if what you say is true then I'll have to check that book out.

While on the subject of Threading, here's an article on hyper threading java for those interested. I saw it on javaworld a few weeks ago.

http://www.javaworld.com/javaworld/jw-11-2006/jw-1121-thread.html

Phaelax
Practically a Posting Shark
858 posts since Mar 2004
Reputation Points: 92
Solved Threads: 51
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You