[racket-dev] [plt] Push #24082: master branch updated

From: Jay McCarthy (jay at racket-lang.org)
Date: Fri Mar 23 12:49:19 EDT 2012

Awesome Ryan, thanks for looking into it. I now feel stupid that I
didn't see that before.

I found a really simple solution too.

Jay

On 3/22/12, Ryan Culpepper <ryan at cs.utah.edu> wrote:
> On 03/22/2012 03:27 PM, Jay McCarthy wrote:
>> Someone else noticed this warning.
>>
>> http://bugs.racket-lang.org/query/?cmd=view&pr=12443
>>
>> As the comment below mentions, I don't actually know how to get rid of
>> the warning, but it doesn't cause problems anymore.
>>
>> Does anyone have any ideas or thoughts?
>
> Based on my testing, the call to 'thread' that sometimes fails is the
> one labeled "Clean-up and timeout thread". My guess is that the handler
> thread (the one that calls 'handler') ends by calling
> 'custodian-shutdown-all' on its current custodian ('c'), and
> occasionally that shutdown occurs before the cleanup thread is even created.
>
> One way to fix it is to delay the handler thread's execution until the
> cleanup thread has been created (eg, have the handler thread wait on a
> semaphore that isn't posted until after the cleanup thread is created).
>
> Another way would be to create the cleanup thread first, but that
> requires both synchronization and mutation, because it needs to refer to
> the handler thread.
>
> Ryan
>


-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93

Posted on the dev mailing list.