/** * Find the active Continuation for the given tag. Must be called with an * interned string. * * @param tag The interned string to search for * @return The continuation associated with this tag */ public Continuation getActiveCatch(Object tag) { for (int i = catchIndex; i >= 0; i--) { Continuation c = catchStack[i]; if (runtime.is1_9()) { if (c.tag == tag) return c; } else { if (c.tag.equals(tag)) return c; } } // if this is a fiber, search prev for tag ThreadFiber fiber = getFiber(); ThreadFiber prev; if (fiber != null && (prev = fiber.getData().getPrev()) != null) { return prev.getThread().getContext().getActiveCatch(tag); } return null; }
/** * Find the active Continuation for the given tag. Must be called with an * interned string. * * @param tag The interned string to search for * @return The continuation associated with this tag */ public Continuation getActiveCatch(Object tag) { for (int i = catchIndex; i >= 0; i--) { Continuation c = catchStack[i]; if (c.tag == tag) return c; } // if this is a fiber, search prev for tag ThreadFiber fiber = getFiber(); ThreadFiber prev; if (fiber != null && (prev = fiber.getData().getPrev()) != null) { return prev.getThread().getContext().getActiveCatch(tag); } return null; }
/** * Find the active Continuation for the given tag. Must be called with an * interned string. * * @param tag The interned string to search for * @return The continuation associated with this tag */ public Continuation getActiveCatch(Object tag) { for (int i = catchIndex; i >= 0; i--) { Continuation c = catchStack[i]; if (c.tag == tag) return c; } // if this is a fiber, search prev for tag ThreadFiber fiber = getFiber(); ThreadFiber prev; if (fiber != null && (prev = fiber.getData().getPrev()) != null) { return prev.getThread().getContext().getActiveCatch(tag); } return null; }