Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

The second thread, which uses more than 50% of my CPU, must be able to stop and run again, which I asked already with this question on Stack Overflowthis question on Stack Overflow.

The second thread, which uses more than 50% of my CPU, must be able to stop and run again, which I asked already with this question on Stack Overflow.

The second thread, which uses more than 50% of my CPU, must be able to stop and run again, which I asked already with this question on Stack Overflow.

added 132 characters in body
Source Link
Long John
  • 143
  • 1
  • 1
  • 4

EDIT:
The finish element will be changed by a getter and setter. Because it is volaitle, it shouldn't get complications.

EDIT:
The finish element will be changed by a getter and setter. Because it is volaitle, it shouldn't get complications.

added 2 characters in body; edited tags; edited title
Source Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237

Decrease CPU usage in While Loopwhile loop

I've a application which runs with two threads.
The The main-Thread thread runs in one infinity-while-loop:

The second Threadthread, which uses more than 50% of my CPU, must be able to stop and run again, which I asked already with this question on StackoverflowStack Overflow.
The

The solution works perfectly, but as I already said, it uses >50% of the CPU.
Here Here are the two loops of the solution:

How I'm able tocould I reduce the use of CPU while holdretaining the functionality?

Decrease CPU usage in While Loop

I've a application which runs with two threads.
The main-Thread runs in one infinity-while-loop:

The second Thread, which uses more than 50% of my CPU, must be able to stop and run again, which I asked already with this question on Stackoverflow.
The solution works perfectly, but as I already said, it uses >50% of the CPU.
Here are the two loops of the solution:

How I'm able to reduce the use of CPU while hold the functionality?

Decrease CPU usage in while loop

I've a application which runs with two threads. The main thread runs in one infinity-while-loop:

The second thread, which uses more than 50% of my CPU, must be able to stop and run again, which I asked already with this question on Stack Overflow.

The solution works perfectly, but as I already said, it uses >50% of the CPU. Here are the two loops of the solution:

How could I reduce the use of CPU while retaining the functionality?

changed title
Link
Malachi
  • 28.7k
  • 11
  • 86
  • 188
Loading
Tweeted twitter.com/#!/StackCodeReview/status/422755393874694144
added 1032 characters in body
Source Link
Long John
  • 143
  • 1
  • 1
  • 4
Loading
Source Link
Long John
  • 143
  • 1
  • 1
  • 4
Loading