Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Continuations and GC
Christoffer Lernö
2/5/2006 11:13:00 AM
I have problems getting things GC:ed properly when using
continuations, which is a bit disturbing.
I was looking at a few implementations of coroutines and they seem to
prevent their continuations from being gc:ed.
For example, I looked at this implementation:
http://onestepback.org/articles/invitationtoruby/coroutin...
Altering the end of this demo to do:
first.start
first = nil
second = nil
garbage_collect
ObjectSpace.each_object(Continuation) {|x| puts x }
Gave me a list of all the continuations spawned by the two
coroutines. Apparently they had yet to be GC:ed. Another
implementation seemed to be similarly flawed.
Is there a way to make this work or perhaps my understanding of the
GC is flawed?
Sincerly,
Christoffer
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Continuations and GC
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password