[Mono-list] P/Invoke and threading

Steven Kirk steven.kirk at status-scientific.com
Thu Aug 11 06:15:26 EDT 2005


Hello,

I am trying to wrap libjack in mono using P/Invoke but am having 
problems with the process callback. However when libjack tries to call 
the delegate I have registered with it, I get the following error:

** ERROR **: Thread 0x409 calling into managed code is not registered 
with the GC. On UNIX, this can be fixed by #include-ing <gc.h> before 
<pthread.h> in the file containing the thread creation code.

I assume what this is saying is that libjack is calling the delegate on 
a thread created by itself, which the GC does not know about. I 
obviously don't want to go adding #includes into the libjack code, is 
there any other way around this?



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.5/68 - Release Date: 10/08/2005



More information about the Mono-list mailing list