summaryrefslogtreecommitdiff
path: root/ref-filter.h
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2015-09-01 16:22:43 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-09-01 15:11:53 -0700
commit661a8cf408e83e4901bf09e2a48e9306622442dd (patch)
treef9bb2bd593d27765d0c23fe236ede6342e052f86 /ref-filter.h
parentpkt-line: support tracing verbatim pack contents (diff)
downloadtgif-661a8cf408e83e4901bf09e2a48e9306622442dd.tar.xz
run-command: provide in_async query function
It's not easy for arbitrary code to find out whether it is running in an async process or not. A top-level function which is fed to start_async() can know (you just pass down an argument saying "you are async"). But that function may call other global functions, and we would not want to have to pass the information all the way through the call stack. Nor can we simply set a global variable, as those may be shared between async threads and the main thread (if the platform supports pthreads). We need pthread tricks _or_ a global variable, depending on how start_async is implemented. The callers don't have enough information to do this right, so let's provide a simple query function that does. Fortunately we can reuse the existing infrastructure to make the pthread case simple (and even simplify die_async() by using our new function). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ref-filter.h')
0 files changed, 0 insertions, 0 deletions