Skip to content

Instantly share code, notes, and snippets.

ssize_t getAsyncStackTraceSafe(uintptr_t* addresses, size_t maxAddresses) {
size_t numFrames = 0;
// Start by walking the normal stack until we get to the frame right before
// the frame that holds the async root.
StackFrame* normalStackFrame = (StackFrame*)FOLLY_ASYNC_STACK_FRAME_POINTER();
StackFrame* normalStackFrameStop = nullptr;
const auto* asyncStackRoot = tryGetCurrentAsyncStackRoot();
AsyncStackFrame* asyncStackFrame = nullptr;
@lewissbaker
lewissbaker / executor_compromise.md
Last active September 7, 2018 19:52 — forked from LeeHowes/executor_compromise.md
P1055 and P0443 - a compromise

P1055 and P0443 - a compromise

Summary

The goal here is to provide a minimal set of changes to P0443 that allows us to aim for a clean, lazy-by-default API, that does not drastically change the expectations of the P0443 authors.

I am making a few assumptions in writing this:

  • I am not worrying about bikeshedding names. Where appropriate I will use names from P0443 even if they don't really make sense any more as names. We can change them.
  • I believe we may wish to tweak the particular parameters to the bulk execute operation. We will likely also want other types of task such as a value + error task as I described in P1054. I do not worry about that here.
  • I do not expect changes to the properties mechanism except in so much as the types they return may differ slightly.