All Questions
Tagged with loops multithreading
4
questions
1
vote
2
answers
133
views
Should I be Using a Thread?
I made a console application which makes the mouse click in the middle of the screen every two minutes. It has a while True loop in it which is meant to keep going for relatively long periods of time (...
0
votes
10
answers
1k
views
Why does the instruction "do" require a "while"? [closed]
Since this statement is so common:
while (true) (Java)
or
while (1) (C)
or sometimes
for (;;)
Why is there not a single instruction for this? I could think that an instruction that could do it ...
0
votes
2
answers
1k
views
Loading chunks around center
I am making a voxel game like Minecraft. I am able to load chunks using multithreading with the code...
for (int x = 0; x < WorldSettings.WORLD_WIDTH_IN_CHUNKS; x++)
{
for (int y = 0; y < ...
10
votes
4
answers
17k
views
Is it a performance hit to create threads that loop a lot to check for things?
This is a generic question that I've always wondered.
In general, is it intensive for a CPU to create threads that perform "while not true ..." loops or similar?
For example, suppose I do:
// ...