[Ecls-list] multi-threaded C++ app

Dean O'Connor dean.oconnor at ite.com.au
Tue Oct 25 01:24:19 UTC 2005


Well I have removed the gh.c include, and I can compile fine.
But I still get an unhandled exception error as soon as I call 
ecl_import_current_thread(Cnil, Cnil);

In line with your example, I am creating a native win32 thread using 
_beginthreadex.

The main thread simply calls the cl_boot, then creates the thread with 
immediately calls ecl_import_current_thread.

This seems to work ok on linux, but not on windows.

Dean.

Juan Jose Garcia Ripoll wrote:

>On Tue, 2005-10-25 at 17:44 +1000, Dean O'Connor wrote:
>  
>
>>Thanks :) I have refreshed from CVS and tested your example and my app 
>>on our Gentoo linux box.
>>Am just doing a few more tests to verify for sure, but they both seem to 
>>work ok.
>>
>>However, I can't even compile with MSVC 6.0 (with ECL_THREADS).
>>
>>If I don't include the "gc.h" include, it will compile. But if I include 
>>it, I get these errors.
>>    
>>
>
>Sorry, the example was not up to date. You must only include <ecl.h>,
>not <gc.h>. The beginning of the program should read
>
>#include <stdlib.h>
>#include <stdio.h>
>#include <unistd.h>
>#include <pthread.h>
>
>/*
> * We need to include the following header. The reason is that the
> * garbage collector needs to manage the creation/destruction of
> * threads, but he can only do it if we call its own routines.
> * For instance, under Linux the following header replaces
> * phtread_create with GC_pthread_create.
> */
>#include <ecl.h>
>
>This is because _now_ ecl.h automatically includes gc.h
>
>Regards,
>
>Juanjo
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by the JBoss Inc.
>Get Certified Today * Register for a JBoss Training Course
>Free Certification Exam for All Training Attendees Through End of 2005
>Visit http://www.jboss.com/services/certification for more information
>_______________________________________________
>Ecls-list mailing list
>Ecls-list at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/ecls-list
>  
>




More information about the ecl-devel mailing list