Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
0
You will understand its magic when you actually need to use a new thread. If you dont want your application to freeze, use new thread. Imagine you have to read data from serial every 1ms and visualize them in real-time on a graph. Now if you want your data to actually show up on your graph, you have to use at least a new thread who read data from serial and stores them on an array for example. At the same time you are able to click any buttons and do any other action on your GUI and your EDT is still responsive
1st Apr 2019, 9:05 PM
Kostas Batz
Kostas Batz - avatar