[cats-devel] Re: Suspending thread in control mode [Spawner]

  • From: Denis Rotanov <denis@xxxxxxxxxxx>
  • To: cats-devel@xxxxxxxxxxxxx
  • Date: Thu, 11 Jun 2015 18:46:50 +1000

On 11.06.2015 16:30, Alexander Klenin wrote:

On Wed, Jun 10, 2015 at 8:48 AM, Denis Rotanov <denis@xxxxxxxxxxx> wrote:
I came up with an idea of suspending the process if it's not being waited
for by controller. And to start all the normal processes suspended by
default until controller issues a wait request. This will be done by calling
SuspendThread for each thread of a process. What do you think?

Interesting, I have just read about this the other day:
https://github.com/ryanries/UniversalPauseButton

Worth investigating, but need to be optional at least initially.

If you do that, please do not mix up pull requests again -- send other
protocol code first.

I read about similar use case as ours here http://www.codecup.nl/faq.php they're guaranteeing suspended status of a process at certain times. And I planned to include such to our protocol too. If I do so this code will become "protocol code" too.

The thing is I already done suspend/resume functionality here (actually yesterday):
https://github.com/rotanov/Spawner/commit/76b06753028f62914de849aa45f744f7a9f7bce6
https://github.com/rotanov/Spawner/commit/deba0145c873c72cba3331de1c0e36f0106c6ab4
https://github.com/rotanov/Spawner/commit/d3189901564bc7bce45ab7efa17a050cc8df4429

It works as intended.



Other related posts: