# Base.throwto() blocking perpetually

**URL:** <https://discourse.julialang.org/t/base-throwto-blocking-perpetually/108237>\
**Category:** General Usage\
**Tags:** question, async\
**Created:** [January 1, 2024, 9:54pm UTC](https://discourse.julialang.org/t/base-throwto-blocking-perpetually/108237 "2024-01-01T21:54:31Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![JoO0oss](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@JoO0oss](https://discourse.julialang.org/u/JoO0oss)\
**Post date:** [January 1, 2024, 10:00pm UTC](https://discourse.julialang.org/t/base-throwto-blocking-perpetually/108237/2 "2024-01-01T22:00:44Z")

</div>

Apparently the answer to the second question is quite easy, use `schedule(task, InterruptException(), error=true)` instead of `Base.throwto(task, InterruptException())`  
(See the very bottom of [this page](https://discourse.julialang.org/t/task-termination/25231/4).)

Although I am still curious as to why the infinitely hanging call, if that is used a non-limited number of times within a program would that eventually clog up memory with records of tasks/threads that have `throwto()` blocking them?

---

_[View the full topic](https://discourse.julialang.org/t/base-throwto-blocking-perpetually/108237)._
