Hi Ian,

Links doesn't currently garbage collect unwakeable client-side processes. The current implementation stores a pointer for each mailbox and each blocked process. We could certainly avoid storing a pointer for empty mailboxes with very little change to the JavaScript run-time. In order to avoid storing a pointer for each blocked process we'd need to pass the closure around with the process id, which would also be doable, though we'd have to be careful about passing process ids to the server.

Sam

On 14/07/2011 15:40, Ian Stark wrote:
Does Links garbage collect unwakeable client-side threads?

Specifically, I'm interested in setting up a mutable list as a linked list of
mutable cons cells.  Doing this with a stateful thread for each cell seems
workable, but I'm not sure whether the list would get garbage-collected once
pointers to it are gone.

If a thread is waiting on its mailbox, but no-one outside the thread has that
mailbox address, will it be garbage collected?  At least, will it be
collectable by Javascript, or does the Links scheduling implementation hold
pointers that would keep it around indefinitely?

Thanks,

Ian

_______________________________________________
links-users mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/links-users

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Reply via email to