[Haskell-cafe] Garbage collection and finalizer thread priority
gracjan at acchsh.com
Mon Jun 13 09:32:18 EDT 2005
Simon Marlow wrote:
> I presume you're running GHC. There's no way to increase the priority
> of a thread - GHC's scheduler doesn't have a concept of priorities.
Yes, I forgot to state it explicitly.
> I would look into whether you can use mallocForeignPtr: this is much
> faster than using newForeignPtr with finalizerFree, because the memory
> is garbage collected directly and there's no need for a finalizer.
I use mallocBytes + reallocBytes + addForeignPtrFinalizer finalizerFree.
I wouldn't think this is any different, thanks for your suggestion.
May I ask where that difference comes from?
More information about the Haskell-Cafe