[all-commits] [llvm/llvm-project] d199b2: [orc-rt] Drop callManagedCodeAsync; tokens guard e...

Lang Hames via All-commits all-commits at lists.llvm.org
Sat Jul 18 06:14:56 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d199b284c7d3f98bb7afbbca9e79e078a1da55fe
      https://github.com/llvm/llvm-project/commit/d199b284c7d3f98bb7afbbca9e79e078a1da55fe
  Author: Lang Hames <lhames at gmail.com>
  Date:   2026-07-18 (Sat, 18 Jul 2026)

  Changed paths:
    M orc-rt/docs/Design.md
    M orc-rt/include/orc-rt/Session.h
    M orc-rt/test/unit/SessionTest.cpp

  Log Message:
  -----------
  [orc-rt] Drop callManagedCodeAsync; tokens guard execution (#210508)

callManagedCodeSync is renamed to callManagedCode, and
callManagedCodeAsync is removed.

callManagedCodeAsync held a ManagedCodeTaskGroup token from the initial
call until the async continuation ran -- across the gap in which the
call is suspended and no managed code is executing. A token is meant to
guard managed code that is executing on a stack, so holding one across
that gap guards nothing while blocking shutdown.

callManagedCode holds a token only for the synchronous call to the
wrapped function, including anything the function runs inline on the
same thread before returning. An async function is called the same way,
with its continuation passed as an ordinary argument. Work deferred past
the function's return -- stashed, or handed to another thread -- runs on
a stack the token no longer guards; whoever later runs it is responsible
for ensuring a token covers it, acquiring one and aborting if the
acquire is denied.

See the new "Managed code execution and shutdown" section in
docs/Design.md for the full model (what a token guards, nested entries,
context-free acquire, and the abortability obligation).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list