Sorry, bumped 'send' by mistake

Imagine I do this:

    (struct fruit (num))
    (define (foo) (make-list 100000000 (fruit 7)))
    (define (bar) (map (compose add1 fruit-num) (foo)))

    (submit-job! (thunk (bar)))

I think that the above is roughly equivalent to doing this:

    (thread (thunk (bar) (sleep <arbitrarily large number>)))

If I'm understanding things correctly, the structs that were created
in (foo) will be up for garbage collection when (bar) exits, even
though the worker thread continues to run.  Is that right?

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 
For more options, visit

Reply via email to