[plt-dev] Async channels and GC

From: Jakub Piotr Cłapa (jpc-ml at zenburn.net)
Date: Mon Jan 4 20:07:30 EST 2010

On 09-12-20 16:40, Matthew Flatt wrote:
> That was a leak. The implementation of `scheme/async-channel' uses
> `thread-resume', which created a strong link from its first argument to
> its second argument. The link should be weak if the thread is blocked
> in some way other than being explicitly suspended.
>
> The bug fixed is now fix in SVN.
>
> Thanks for the report!

The reports are easy, your quick fixes are what the world (myself 
included) is thankful for. :)

The memory usage in 4.2.3.9 is much better but unfortunatelly it seams 
it is still leaking the async-channel manager threads. As far as I 
understand the thread should go away together with the channel but it 
somehow escapes the garbage collection (and maybe even a custodian 
shutdown? I have not yet tried to verify this). Please check the 
test-case attached below.

PS. The continuation-mark-set->context output changes between runs in 
DrScheme and mzscheme. Even adding "-l errortace -j" to the mzscheme 
command line does not make the context appear deterministically. 
(Un)fortunately the extracted context is not very interesting in either 
case.

-- 
regards,
Jakub Piotr Cłapa
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: async-channel-test.ss
URL: <http://lists.racket-lang.org/dev/archive/attachments/20100105/3d2b5fc4/attachment.ksh>

Posted on the dev mailing list.