Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd debugging hooks for futures #6
Comments
aturon
added
the
futures
label
Apr 18, 2018
This comment has been minimized.
This comment has been minimized.
|
@cramertj can you sketch out the ideas from the All Hands? |
This comment has been minimized.
This comment has been minimized.
|
There's been some back and forth about the best way forward, but the original idea was to have a linked list of contextually relevant use std::fmt::Debug;
enum DebugList<'a> {
Nil,
Cons(&'a Debug, &'a DebugList<'a>),
}
There's also been talk of doing this outside of |
This comment has been minimized.
This comment has been minimized.
jsgf
commented
Jul 24, 2018
|
There's a few things I'd like to see:
And just because this is pure wishlist:
We've (mostly @kulshrax) done some prototyping in house, and are mostly at the level of a tracing combinator approach, which is OK but it's limited in scope. I'd like to maintain dependency info, but the lack of a suitable context to hang it off has been hampering that effort (per-thread isn't suitable and per-task doesn't really work). The addition of an explicit context param to |
This comment has been minimized.
This comment has been minimized.
jsgf
commented
Jul 26, 2018
|
Oh, another thing that's pretty painful - some standard way to capture panics so they don't get lost. At the moment they just evaporate. |
This comment has been minimized.
This comment has been minimized.
sfackler
commented
Jul 26, 2018
|
@jsgf I think https://doc.rust-lang.org/std/panic/fn.set_hook.html may be what you're looking for there? |
This comment has been minimized.
This comment has been minimized.
jsgf
commented
Jul 27, 2018
|
@sfackler As a last resort, but its a bit global. I was thinking of something more per-executor. |
This comment has been minimized.
This comment has been minimized.
aidanhs
commented
Jul 27, 2018
•
|
One thing that I believe was mentioned (I think, trying to dredge my memory) at all hands was that could store your debuglist data by using a combinator, e.g. This is pretty paged-out though and my recollection of the planned design of futures is hazy, so I may be misrepresenting the idea. |
aturon commentedApr 18, 2018
Make it possible to debug deadlocks/lost wakeups by examining the graph of tasks and what they believe they're blocked on.