static void leave() { int code = CEntryPointActions.leaveDetachThread(); if (code != 0) { CEntryPointActions.failFatally(code, errorMessage.get()); } } }
@Uninterruptible(reason = UNINTERRUPTIBLE_REASON) @CEntryPoint(name = "detach_thread", documentation = { "Detaches the passed isolate thread from its isolate and discards any state or", "context that is associated with it. At the time of the call, no code may still", "be executing in the isolate thread's context.", "Returns 0 on success, or a non-zero value on failure."}) @CEntryPointOptions(prologue = NoPrologue.class, epilogue = NoEpilogue.class, nameTransformation = NameTransformation.class) public static int detachThread(IsolateThread thread) { int result = CEntryPointActions.enter(thread); if (result != 0) { CEntryPointActions.leave(); return result; } result = CEntryPointActions.leaveDetachThread(); return result; }
@Uninterruptible(reason = UNINTERRUPTIBLE_REASON) @CEntryPoint @CEntryPointOptions(prologue = NoPrologue.class, epilogue = NoEpilogue.class, publishAs = Publish.NotPublished) @CEntryPointBuiltinImplementation(builtin = Builtin.DETACH_THREAD) public static int detachThread(IsolateThread thread) { int status = CEntryPointActions.enter(thread); if (status != 0) { CEntryPointActions.leave(); return status; } status = CEntryPointActions.leaveDetachThread(); return status; }