Hi everyone,

I've been trying to get to know Racket's threads and particularly 
filesystem-change-evt, and I've come to a point of confusion. I thought that a 
filesystem-change-evt's synchronization result was supposed to be the event 
itself, which it is most of the time, but in combination with thread-suspend it 
seems to produce #f, and I'm not sure why.

Here's a tiny example:

> (define t
       (thread (λ ()
                       (println (sync (filesystem-change-evt "test"))))))
> (thread-suspend t)
;; at this point I go and do something like "echo foo >test"
> (thread-resume t)
;; prints #f

Is this supposed to happen?

What's particularly confusing is that the same thing happens (i.e. #f is 
printed) if I instead define t to be:

(thread
   (λ ()
     (println
       (sync (wrap-evt (filesystem-change-evt "test")
                                   (λ (x) 'my-result))))))

Does anyone know what's going on?

Thanks,
Philip

-- 
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