When should I use multi threading in applications i make?

When should I use multi threading in applications i make?

Attached: 1636191607092.jpg (2508x4400, 1.57M)

>When should I use multi threading in applications i make?
Why?

because i have application that go trough lot of data.

Attached: 1640243713405.png (1143x1800, 913.68K)

when your application has stuff that should appear to be running on parallel

>When should I use multi threading in applications i make?

when it makes sense to.

>because i have application that go trough lot of data.
if the threads don't need to share data, then sure go for it. can't have data races that way.

ペロペロしたい

When you have multiple jobs done in parallel. When you have to read a bunch of shit, but you don't have to write.

why are anime girls so cute...

Why aren't you? I'm cute as hell, my nigga. I am a beautiful man with smooth skin and big nuts. I draw anime faces on my nuts so that when a bitch is sucking on them it looks like she's having a threesome with anime bitches.

Attached: 1589363216857.jpg (1275x2048, 201.9K)

i bet that she has lots of good milk

needs corrective rape 💢

...

its astounding, faggots are still posting my shitty edit in Year of Our Lord 2022
look around the tits, look at the doorknob

people only see the tits :D

itoddlers will never recover from this 🙄

Whenever you have things you want to do concurrently and don't want to block on, I guess.
I don't usually bother, though.

I hate that the artist draws her face so well but gives her cow tits

Attached: 1648837163866.png (845x406, 276.03K)

you always need an UI thread and a background thread. then from your background thread you have to start more tasks, threads that get closed after processing

>When should I use multi threading in applications i make?
When there are things that can be done in parallel, and it makes sense to go through the trouble of parallelization.
Parallelism is more than just concurrency. Async/await and similar modes of starting a task then waiting to resume are concurrent, but aren't necessarily parallel. There's very rarely a reason not to use concurrency when it's available, but parallelism requires careful consideration to avoid data races and race conditions.

...

>make thread with low-effort question
>post anime porn as OP image
>OMG POST MOAR OF HER
Is it a discord spamming these?

Attached: coomtopic.jpg (866x772, 160.56K)

how do i get a female gf bros...

When you need two sets of computations done in parallel. If you just have IO operations (reading from file/network etc) that need to work in parallel then you are better off using asynchronous approaches.

In general though you should avoid just creating a bunch of threads and dealing with the problems that can cause. Try to use a correct abstraction for what you want to do. For example, usually a job queue with a threadpool backing it is a good approach and most languages will have a decent library for this.