You explained a complex topic in a way that anyone could understand. Great tutorial! I think that it would be nice to see a simple real-world application of multiple threads; searching a large array with a linear search is an example I like to use for demonstrations. :)
at 3:25, you can see that printing order (line 6and 7) has changed. does this means that the second thread finished the task of printing that particular line before the first thread, although you have started the first thread first?
ow do i get my server to talk to my clients, i have a muitl threaded server setup and can get the client data entered to appear on the server with Console.WriteLine(Encoding.ASCII.GetString(data, 0, recv));
ow do i get my server to talk to my clients, i have a muitl threaded server setup and can get the client data entered to appear on the server with Console.WriteLine(Encoding.ASCII.GetString(data, 0, recv));
Each language has it's own rules and logic, therefore one language is not really "more logical" than another. PS: I'm a former C++ coder, and unless you're coding device drivers or other low level stuff C#'s way of doing things is often more robust and less error prone, C++/MFC's windowing structure for example is obtuse and in my view unnecessarily complex. Just my opinion, mind you. o_0
@MaxPFC I know your post was 5 months ago but i have to agree with you here, as i also learned in C++ but evolved right into C# (skipped Java) as a daily coder. Unless you have a need for database programming, bit wise manipulation, and registry handles, C# is more robust, easier, quicker, and less error prone as a development language. Learning C# and OOP was two of the best things i ever did. I only go back to C++ to use Eclipse as an IDE for Linux now.
thnx.. but explain me this line...........what is occuring in NEW THREAD STAR,,,,?Thread t1 = new Thread(new ThreadStart(Mymethod) );... can v satrt new thread in another line?
Imagine a bank with 1000 tellers, and an application with 1 million customers that need to bank. Without threading your million customers have to stand in 1 line, with threading you can create as many lines as you want (almost).
The bank is a webservice or other asynch communication.
@mindprism Another good example of what threading can have is Servers that have multiple clients. This way you can allow each one "time" on the server without having to wait on another process to finish.
Thought it was very clarifying til I found out ThreadWork isn't built in (?) . Now I'm just confused and not sure how to do something similar on my own.
@BenRangel ThreadWork does not exist, it was a class he made with just some methods that do something, for demo purposes. You can add your own class with a couple of methods that print somehting in a loop (like he did), and call them on separate threads in a test console application.
Great video, well explained. Don't forget that threads can cause unnecessary overhead and/or greatly increase complexity of the code if improperly used.
Thank you very much, that was a very clear video...could you add more tutorials on database creating, managing and remote connection....sorry, its too much...but I mean all the database field in the C#. Please
Thanks! Now i understand what threading does and what it's good for!
TheBIRDIEGaming 3 weeks ago
You explained a complex topic in a way that anyone could understand. Great tutorial! I think that it would be nice to see a simple real-world application of multiple threads; searching a large array with a linear search is an example I like to use for demonstrations. :)
TheProgrammer93 1 month ago
What are threads used for?
TwoBadMilosDead 1 month ago in playlist QuackWare C# Tutorials
thank you
RonaldinhoMilano18 3 months ago in playlist c#
nice example
jattbeyondlimit 3 months ago
Courier New? Be ashamed! Get Consolas now! :D
TheProgrammer93 3 months ago
thanks
the code :
systemio.net/snippets.php
itayarye82 5 months ago
Thank you :)!
SuperHddf 5 months ago
how to stop a thread from the middle of its execution?
TheMasterAbdul 7 months ago
excellent tutorial
thank you
hellsing357 7 months ago
Nice introduction to threads...
tripathiashishk 7 months ago
thanks for the effort making this easy and clear
khanolid 8 months ago
excellent tutorial, thank you!!
SDAction2009 9 months ago
at 3:25, you can see that printing order (line 6and 7) has changed. does this means that the second thread finished the task of printing that particular line before the first thread, although you have started the first thread first?
ealshabaan 10 months ago
@ealshabaan Yes that is what it means. Remember, threads have no speed control. There are tricks on how to add the ability though.
janequorzar 10 months ago
This has been flagged as spam show
ow do i get my server to talk to my clients, i have a muitl threaded server setup and can get the client data entered to appear on the server with Console.WriteLine(Encoding.ASCII.GetString(data, 0, recv));
but how do i talk back???
thanks
peternicolisgod 10 months ago
This has been flagged as spam show
ow do i get my server to talk to my clients, i have a muitl threaded server setup and can get the client data entered to appear on the server with Console.WriteLine(Encoding.ASCII.GetString(data, 0, recv));
but how do i talk back???
thanks
peternicolisgod 10 months ago
i havent completed a c++ book yet. but imo. i tink c++ feels easier & more logical & more power
Necry3d 11 months ago
Each language has it's own rules and logic, therefore one language is not really "more logical" than another. PS: I'm a former C++ coder, and unless you're coding device drivers or other low level stuff C#'s way of doing things is often more robust and less error prone, C++/MFC's windowing structure for example is obtuse and in my view unnecessarily complex. Just my opinion, mind you. o_0
MaxPFC 9 months ago
@MaxPFC I know your post was 5 months ago but i have to agree with you here, as i also learned in C++ but evolved right into C# (skipped Java) as a daily coder. Unless you have a need for database programming, bit wise manipulation, and registry handles, C# is more robust, easier, quicker, and less error prone as a development language. Learning C# and OOP was two of the best things i ever did. I only go back to C++ to use Eclipse as an IDE for Linux now.
evhgl87 4 months ago
This has been flagged as spam show
very helpfull....
donjomon 1 year ago
very helpfull
donjomon 1 year ago
ellerine sağlık hocam. Oldukça merak ettiğim bir konuyu basit ve güzel bir şekilde yapmışsınız.. devamı var mı acaba?
energyzerable 1 year ago
This has been flagged as spam show
Existent Be Naughty dating benaughtyman.info
AbigayleAbril 1 year ago
thank you nice tutorial
adiosundfeuerfrei 1 year ago
Thank you. It was so much helpful for me. =)
meethong 1 year ago
thnx.. but explain me this line...........what is occuring in NEW THREAD STAR,,,,?Thread t1 = new Thread(new ThreadStart(Mymethod) );... can v satrt new thread in another line?
POONKAATELEVISION 1 year ago
where can i get the threadwork class ?
haririanali 1 year ago
good video, my question is how do I choose HOW many threads is it good/common to have?
Mtbfanro 1 year ago
I like this video
YouSorin87bv 1 year ago
This might seem like a silly question.
But what advantages does dual threading have?
What program would this improve?
I have dual core CPU, so I can do it; with what I'm programming so far, I don't need it, but yeah... The question?
imalwayswatchingu00 1 year ago
@imalwayswatchingu00 {But what advantages does dual threading have?}
One example:
Imagine a bank with 1000 tellers, and an application with 1 million customers that need to bank. Without threading your million customers have to stand in 1 line, with threading you can create as many lines as you want (almost).
The bank is a webservice or other asynch communication.
mindprism 11 months ago
@mindprism ah yes, that was a good interpretation!
Thank you, even though I asked it 6 months ago.
fast reply, hehe.
imalwayswatchingu00 11 months ago
@mindprism Another good example of what threading can have is Servers that have multiple clients. This way you can allow each one "time" on the server without having to wait on another process to finish.
janequorzar 10 months ago
Thought it was very clarifying til I found out ThreadWork isn't built in (?) . Now I'm just confused and not sure how to do something similar on my own.
BenRangel 1 year ago
@BenRangel ThreadWork does not exist, it was a class he made with just some methods that do something, for demo purposes. You can add your own class with a couple of methods that print somehting in a loop (like he did), and call them on separate threads in a test console application.
Mtbfanro 1 year ago
very helpful thanks dude!
sleepless2484 1 year ago
It says that it can't find ThreadWork. using System.Threading; is there, so I don't know why it can't find ThreadWork... Anyone know what's up?
FlablessGuy 1 year ago
@FlablessGuy
ThreadWork was of his own design.
Divinized 1 year ago
Thank you for the tutorials. I learned alot.
MrButtRocket 1 year ago
Great video, well explained. Don't forget that threads can cause unnecessary overhead and/or greatly increase complexity of the code if improperly used.
LeftTechticle 1 year ago
nice tutorial. very easy to follow
reklawnehpets 1 year ago
How do u make the output in command prompt?
DaLunKeZhang 1 year ago
@DaLunKeZhang Usually just Console.WriteLine("text goes here");
QuackWare 1 year ago
Good tutorial.
Although i feel comfortable with BackGroundWorker Class.
dingoji 1 year ago
Thank you very much, that was a very clear video...could you add more tutorials on database creating, managing and remote connection....sorry, its too much...but I mean all the database field in the C#. Please
dhuhahussam 1 year ago
You should add this.
Your processor can only do one thing at one time.
So if you only have one processor...
It would be faster doing them separately.
If you have a dual core,quad core or whatever. Then you can do more than one thing at the same time.
iDylanx3 2 years ago
no you are wrong.
RocketSpecialist 1 year ago
Hey thank you man
BigOldDirtyBastard 2 years ago
WOW!!! You actually made the topic EXTREMELY clear for me! Thanks a bunch! :)
seifer877 2 years ago 11
Nice, thank you :)
dezerte 2 years ago 5
im in school for C prgramming right now and you teach it better than my teacher. You should do one on how to make games, beginner games of course.
(tetris, tic tac toe, etc)
Thanks for your tutorials they help me soo much
CandyTutorials 2 years ago
You better find a different school If your teacher is that shallow.
facebongo 2 years ago
Is it possible in Visual Basic 2008?...
ferna2294 2 years ago
Is this only about console applications, or also for Winforms?
(i'm new to c#)
freeuse 2 years ago
You can do the same thing with winforms, it does not matter.
QuackWare 2 years ago
Thanks for the reply QuackWare
freeuse 2 years ago
very well done but dont forget about the default thread!
LeftTechticle 2 years ago 2
Very good !
I understand now.
WESTSEYI 2 years ago 2