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

Detect when a completion callback hasn't been called #7

Open
balupton opened this issue Nov 20, 2013 · 1 comment
Open

Detect when a completion callback hasn't been called #7

balupton opened this issue Nov 20, 2013 · 1 comment

Comments

@balupton
Copy link
Member

Sometimes people simply forget, or programs enter in a particular state, where a completion callback is not called. This can cause unexpected problems, that unfortunately should happen. We should do something to avoid this situation.

My current thoughts are we could detect when we are idling and we are still waiting on a task to complete, if so, then we can output a warning message that lets you know which task we are still waiting for. This should be able to be turned off via a configuration option.

Would help realise problems such as #6

@balupton
Copy link
Member Author

It seems we can use process.memoryUsage() perhaps. However, that is for the entire app, not just the particular scope.

So if the app has something happening in the background somewhere else, then this check will fail. So we can't use it.

We could implement a timeout check on the Task class, however, however, that would also fire if sub-tasks are also taking a long time.

So perhaps the detection can happen in the Task class, but the reporting happens in the TaskGroup class perhaps.

Or maybe, detection and reporting happens in the Task class, but TaskGroup turns it off for TaskGroup Tasks.

The issue then, is that the idle detection will only work best if all the task groups are attached together using the v3 nested abilities. However, as that makes a lot of sense, I'm happy encouraging that as the way forward.

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

1 participant