Multi Threads...WHAT??

Started by
10 comments, last by doublek 18 years, 8 months ago
Ok...My fiste tread means my first question... By searching on the web for Game Engine, i saw a lot of them that uses "Multi Threads". My question is : What the hell is that????? Please answer me fast...
--The Fighter Of C++ Is Back--<$!-DoubleK-!$>
Advertisement
Hmm, how would one find the answer to that question?
"Many programming languages, operating systems, and other software development environments support what are called "threads" of execution. Threads are similar to processes, in that both represent a single sequence of instructions executed in parallel with other sequences, either by time slicing or multiprocessing. Threads are a way for a program to split itself into two or more simultaneously running tasks. (The name "thread" is by analogy with the way that a number of threads are interwoven to make a piece of fabric)."

http://en.wikipedia.org/wiki/Thread_(computer_science)

Edit: Aww man, I posted at the same time Sneftel. Did I give too much? :P
A thread is a unit of execution in a process. A single threaded program only has one sequence of execution. In order to do multiple things it needs to manually juggle the different things with various techniques such as message loops. A multi-threaded program has multiple simultaneous units of execution. This allows a program to do multiple things at once with simpler logic in each thread. For example, one thread might manage networking while another manages the sound system. However, this has a cost in that the operating system needs to schedule the thread which results in context switches. Also sharing information between threads can have unexpected results if two threads try to access the same information at the same time, since the threads are theoretically operting simultaneously.
Why do people help these people. Just do this, "Try http://www.google.com/ (or in doublek area of the world, .ca) and search for 'multi-threading' and find a wonderful world of answers!"

Give a man a fish, feed him for a day. Give a man a fishing rod and feed him for life. (something like that, you get the jist). I'm all for helping, but help people help themselves first. Like the first reply did.

And what is this "respond fast" bs. Does your engine need to be finished tonight?
It could be derek7 (or whatever his name is) again.
believe it or not, a lot of people don't know how to make a good google search, and also don't know the synonyms and related terms to a thing they barely know at all ...

so a helpful response is one that either gives them the search terms ... like:

"google for: multithreading, thread programming" (or the wiki reference one)

or something like SiCrane's post which gives a teaser amount of information that helps them start to recognize a few relations with things they might already know.
Quote:Original post by Xai
believe it or not, a lot of people don't know how to make a good google search, and also don't know the synonyms and related terms to a thing they barely know at all ...

so a helpful response is one that either gives them the search terms ... like:

"google for: multithreading, thread programming" (or the wiki reference one)

or something like SiCrane's post which gives a teaser amount of information that helps them start to recognize a few relations with things they might already know.


I change my time-honoured tradition of using the Ying-Yang Icon for my post, and instead salute you with a hearty thumbs-up!

We are here to help people, and when people google for these sorts of things they sometimes end in GameDev, and in threads just like this one, so let's give the people that are reading this a good explanation and erase their doubts...

We're here to take a bit, and give a bit... share... there is no place here for egotistical behaviours...
I normally like "google for 'something'" posts, if they at least contain a good search criterium for the question. With good search criteria, google certainly is quite helpful. But some of these posts are completely pointless, for example posting "google for 'engine architecture'" in a thread originally called "Suggestions on engine architecture" simply doesn´t help a bit, because I guess everyone using something like the GameDev forum would know Google and would probably have tried it, but still might not know anything more specific to state their question more precise.

After telling my humble opinion, I´d like to ask a second question concerning threads: Some of the first hits in google was a nice little sumamry of multi-threading. But things like mutexes, semaphors or something like "event-driven" multi-threading (sry, is a german site I got that, so I don´t know the exact term in english for that) was only just shortly mentioned. I would really appreciate a site telling me more about multi-threading concerning exclusive data and explaining those things like mutexes, semaphors and so on more thoroughly.

Thx for reading.

PS: @doublek 'Please answer me fast..." is frankly quite blunt I think... just sounds like "Don´t have time, just give me the answer and buzz off", which is never polite, but as a first post?
Sry I can´t help you though, since I´m just beginning to look at multi-threading stuff.
Quote:After telling my humble opinion, I´d like to ask a second question concerning threads: Some of the first hits in google was a nice little sumamry of multi-threading. But things like mutexes, semaphors or something like "event-driven" multi-threading (sry, is a german site I got that, so I don´t know the exact term in english for that) was only just shortly mentioned. I would really appreciate a site telling me more about multi-threading concerning exclusive data and explaining those things like mutexes, semaphors and so on more thoroughly.

The most useful article I've ever read on multithreaded programming.

This topic is closed to new replies.

Advertisement