Home > Back-end >  How to learn a multithreaded
How to learn a multithreaded

Time:09-16

You teach me how to learn the great spirit of multithreading, please see my head completely can't find the exit

CodePudding user response:

Multithreading to understand the principle of some operating systems, know how threads are created, how to schedule, and then to learn how to write,

CodePudding user response:

Simple point, multithreading is your thread (1) you do, I do my threads (2), each other, there is no order, can do things at the same time, complex scenarios may at some point, of course, need to wait for each other, mutual operation of data need to lock, etc.,

CodePudding user response:

refer to the second floor datafansbj response:
simple point, multithreading is your thread (1) you do, I do my threads (2), and each other, there is no order, can do things at the same time, complex scenarios may at some point, of course, need to wait for each other, mutual operation of data need to lock, etc.,

Well well, this I know, but how to do, how to use the mask

CodePudding user response:

reference 1st floor icoolno1 response:
multithreading to understand the principle of some operating systems, know how threads are created, how to schedule, and then to learn how to write,

Ok, thank you

CodePudding user response:

Crafting
reference 3 floor stone response:
Quote: refer to the second floor datafansbj response:
simple point, multithreading is your thread (1) you do, I do my threads (2), and each other, there is no order, can do things at the same time, complex scenarios may at some point, of course, need to wait for each other, mutual operation of data need to lock, etc.,

Well well, this I know, but how to do, how to use the



Learn a simple system to deepen the understanding for tickets

CodePudding user response:

Int num=100;
Thread t=new Thread (() - & gt;
{
for(int i=0; i
System.out.println(i);
}
});

t.start();

CodePudding user response:

Can read about how the operating system supports multiple processes, such as I write this article

https://blog.csdn.net/zy353003874/article/details/107164305

Then, in contrast with understanding the synchronized keyword in Java, (this part is writing)

Then go to see the Java provides concurrent toolkit (such as thread pool, CountDownLatch, Sempthore, etc.)

CodePudding user response:

Then the above, if you still don't know how to use, so suggest you to learn the first Thread method, also recently is writing concurrent (source code parsing) related knowledge, interested can look at

CodePudding user response:

Ok thank you

CodePudding user response:

reference crafting stone of the building Lord reply:
you teach me how to learn the great spirit of multithreading, please see I can't find a head completely export


Recommend you this: https://download.csdn.net/download/s478853630/11969293

CodePudding user response:

Can see video practice according to the video

CodePudding user response:

references to the tenth floor winter snow crystal response:
Quote: refer to the original poster crafting stone response:
you teach me how to learn the great spirit of multithreading, please see I can't find a head completely export


Recommend you this: https://download.csdn.net/download/s478853630/11969293

Ok, I see, thank you

CodePudding user response:

First look for several kinds of way to create a thread and distinction, and familiarize yourself with the thread safety of apis, such as synchronized, already, BlockingQueue, understand the difference, find a multi-threaded implementation look at code, producer and consumer understand code written code, take notes,

CodePudding user response:

Look at my collection: https://blog.csdn.net/dotnetstudio/category_6818551.html

CodePudding user response:

Brief process, thread, multithreading (implementation ways) and thread safety problem (solve ways) :
https://blog.csdn.net/weixin_44356108/article/details/108115529

CodePudding user response:

Night check data, write a few programs run more, to understand, is not difficult,
https://www.cnblogs.com/lwbqqyumidi/p/3804883.html

CodePudding user response:

Bi li bi miles above there are a lot of video can consult,

CodePudding user response:

The original poster is to understand the concept of multithreading, or learn multithreading technology?
There is a difference between the two,
If you want to understand the concept of multithreading, you learn some knowledge of operating systems, such as memory management, CPU management, process management, etc.,
In addition to the attached and share data access, namely lock, semaphore, what of,
Multithreading technology, learning to understand the concept on, on the basis of
Studious and write your own several small programs, call the library function provided by the JDK, experience with respect to OK,
Oh, by the way, as is the use of thread pool to relief well,

As for the understanding of the concepts of multithreading, there may be two levels, the primary players understand the CPU time slice and share data locked switch, senior players understand heap data access and thread stack,

CodePudding user response:

reference, 18th floor ice rain response:
the original poster is to understand the concept of multithreading, or learn multithreading technology?
There is a difference between the two,
If you want to understand the concept of multithreading, you learn some knowledge of operating systems, such as memory management, CPU management, process management, etc.,
In addition to the attached and share data access, namely lock, semaphore, what of,
Multithreading technology, learning to understand the concept on, on the basis of
Studious and write your own several small programs, call the library function provided by the JDK, experience with respect to OK,
Oh, by the way, as is the use of thread pool to relief well,

As for the understanding of the concepts of multithreading, there may be two levels, the primary players understand the CPU time slice and share data locked switch, senior players understand heap data access and thread stack,

Mainly technical

CodePudding user response:

refer to 17th floor Java_BG response:
bi li bi miles above there are a lot of video can consult,
ok

CodePudding user response:

reference 16 floor Herry86 response:
evening check data, write a few more programs run, to understand, is not difficult,
https://www.cnblogs.com/lwbqqyumidi/p/3804883.html
ok

CodePudding user response:

To understand basic thread class, runable interface, then such as synchronized, lock the lock the underlying implementation principle, the principle of new bag juc, then start multi-threading, threadlocal, has learned, is it a basic thread into the line, wish you are successful!
  • Related