Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DISCUSSION] Run monitor in a thread executor #137

Closed
ZhukovAlexander opened this issue Dec 5, 2016 · 3 comments
Closed

[DISCUSSION] Run monitor in a thread executor #137

ZhukovAlexander opened this issue Dec 5, 2016 · 3 comments

Comments

@ZhukovAlexander
Copy link
Contributor

Recently I got obsessed by the idea to pull monitoring into the kernel space. What I mean is to me it looks like the monitor thread is a bit of an external interaction with a kernel, which somewhat violates the main principle of curio to restrict any external interaction with a kernel.

So I'm wondering if this makes sense to launch the monitoring server as a task in a thread pool executor. With this we will reuse the curio task management system to supervise the monitor just as any other task. Or am I just trying to overcomplicate what already works fine?

@dabeaz
Copy link
Owner

dabeaz commented Dec 5, 2016

I made the monitor a completely separate entity primarily to facilitate debugging. For example, if the kernel gets locked up or some task runs away forever, the monitor can still operate and (potentially) show some useful information about what is happening. There's definitely a bit of encapsulation being violated. But hopefully it's for a good cause ;-)

@ZhukovAlexander
Copy link
Contributor Author

if the kernel gets locked up or some task runs away forever, the monitor can still operate and (potentially) show some useful

I think running it in a thread pool executor forever until the kernel shuts down should have the same effect, shouldn't it?

Other than that, I cat't imagine how to properly terminate the monitor if it's being run in a thread executor, so probably this is not so good idea :)

@dabeaz
Copy link
Owner

dabeaz commented Feb 17, 2017

Closing for now. All improvements to the monitor welcome though.

@dabeaz dabeaz closed this as completed Feb 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants