[Gc] Ignoring registered threads?
jules at meridiandigital.co.uk
Thu Jun 29 07:05:24 PDT 2006
I've been looking through the archives and can't find anything much
about this, but I'm working on an application which has a number of
soft-real-time threads that I would ideally like to avoid being
interrupted for a stop-the-world collection (it's a multimedia
application working with small buffers to minimise latency, and a longer
than average world stop could easily cause jittering). My current
design has these threads doing some dynamic object allocation at
start-up time, so I can't really prevent them being registered by using
"#undef CreateThread". Working around this would involve creating
additional threads, which I'm keen to avoid.
The only reference I've found to this kind of behaviour is a message
from 2003 (archive at
) in which Hans said:
> You might rarely want to do that to avoid stopping
> it during GC. But this imposes severe constraints on what that thread
> can do.
> In particular, it can't write any pointers to the collected heap, or
> memory using the GC_ routines.
After startup has completed, I will be able to make those guarantees.
Are there any other requirements on the thread's behaviour that I should
be aware of?
He goes on to propose a 'GC_ignore_thread()' API that would allow this
to be done. Has this been implemented? I see it isn't in version 6.4,
but would I get it if I upgraded? If not, is it expected in a
Thanks for your help
More information about the Gc