I've got this code: (thread (thunk (let loop () (define-values (len shost sport) (udp-receive! socket buffer)) ...do stuff with the received message... (loop))))
I'd like to be able to say "If you haven't received a message in X time, kill the thread". I'm not sure how to enact that; sync/timeout won't do it since the thread won't return. I've thought of weird signaling systems using channels or set! on some external value or etc, but they are all terrible. What's the right way to do this? -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CAE8gKocoTTN0VfOToioMq3xK_0ysqAQVHmZ%2BmiFS9iutzY0sxQ%40mail.gmail.com.