# Help test via snapshots: parallel threads

**URL:** <https://racket.discourse.group/t/help-test-via-snapshots-parallel-threads/3920>\
**Category:** General\
**Created:** [August 25, 2025, 1:03pm UTC](https://racket.discourse.group/t/help-test-via-snapshots-parallel-threads/3920 "2025-08-25T13:03:48Z")\
**Posts on this page:** 1\
**Showing post:** 23

<div class="post-metadata">

**Author:** ![mflatt](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/mflatt/32/6_2.png) [@mflatt](https://racket.discourse.group/u/mflatt)\
**Post date:** [October 17, 2025, 9:48pm UTC](https://racket.discourse.group/t/help-test-via-snapshots-parallel-threads/3920/23 "2025-10-17T21:48:10Z")

</div>

> [@LiberalArtist](#):
>
> Potentially a `#:keep 'result/exn` option could be added later.

Yes, I agree. I intended to add that, but haven't gotten to it.

> [@LiberalArtist](#):
>
> It doesn't seem like there's a way to tell currently (without controlling the thread's thunk) if a thread terminated normally, with an exception, or by being killed.

The updated `thread-wait` does support this with an extra fail-thunk argument:

```scheme
> (list (thread-wait (thread #:keep 'results (lambda () (+ "oops"))) 
                     (lambda () 'failed)))
+: contract violation
  expected: number?
  given: "oops"
 [,bt for context]
'(failed)

```

> [@LiberalArtist](#):
>
> From this experiment, it looks like parallel threads must also be blocked, but I'm not sure that behavior is desirable:

The intent is definitely that `(system-idle-evt)` waits until no parallel thread can make progress, the same a coroutine threads. That's important for the only use that I know for `system-idle-evt`, which is testing.

---

_[View the full topic](https://racket.discourse.group/t/help-test-via-snapshots-parallel-threads/3920)._
