[M3devel] foreign threads
j k
jayk123 at hotmail.com
Sun Jan 14 17:45:52 CET 2007
I was just mentioning here the need to create
threads with the Modula-3 libraries vs. "native"
thread creation.
I happened upon this related note:
http://www.mono-project.com/Compacting_GC
To perform the garbage collection, it is important that all the running
threads are stopped,.....
The Mono runtime will automatically register all threads that are created
from the managed world with the garbage collector. But it is important that
any threads that will communicate with the Mono runtime to register these
threads with the garbage collector, so they can be stopped during a
collection, developers embedding the Mono runtime must call the
mono_gc_register_thread.
I still think at least on Windows it tends to be easier -- you can rely on
m3core.dll's DllMain(thread attach) notification to at least know about
threads created after m3core.dll is loaded. That still leaves knowing about
threads created before it was loaded. That's easy to handle inefficiently,
hard to do efficiently.
- Jay
_________________________________________________________________
Find sales, coupons, and free shipping, all in one place! MSN Shopping
Sales & Deals
http://shopping.msn.com/content/shp/?ctid=198,ptnrid=176,ptnrdata=200639
More information about the M3devel
mailing list