Hello,

I'm having trouble catching "terminate break" exceptions when combining 
break-thread with thread-wait.

MWE 1:

  (with-handlers ([exn:break:terminate? writeln])
    (let ([t (thread (lambda () (thread-wait (current-thread))))])
      (break-thread t 'terminate)
      (thread-wait t)))

MWE 2:

  (with-handlers ([exn:break:terminate? writeln])
    (let ([t (thread (lambda () (thread-receive)))])
      (break-thread t 'terminate)
      (thread-wait t)))

Expected:

  #(struct:exn:break:terminate "terminate break" #<continuation-mark-set> 
#<escape-continuation>)

Actual:

  terminate break

FWIW, the following snippet works as expected:

  (with-handlers ([exn:break:terminate? writeln])
    (break-thread (current-thread) 'terminate))

Am I missing something? Any help is appreciated.

Eric

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to