Hello,
I am trying to use Guile from an multi-threaded application. Here is a
sample code:
// test.c
#include <libguile.h>
#include <pthread.h>
static void *
inner_thread (void *p)
{
scm_c_eval_string ("(newline)");
return NULL;
}
static void *
thread (void *p)
{
return scm_with_guile (inner_thread, p);
}
static void
inner_main (void *closure, int argc, char **argv)
{
pthread_t thr;
pthread_create (&thr, NULL, thread, NULL);
pthread_join (thr, NULL);
}
int
main (int argc, char **argv)
{
scm_boot_guile (argc, argv, inner_main, NULL);
return 0;
}
I have read from the Guile manual that I should be able to use threads
in this way. However, I get ERROR: Stack overflow. Do you know where is
the problem? Running `guile --version` returns "Guile 1.8.1".
--
Henri Häkkinen