unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* threads from outside guile
@ 2003-10-22 20:04 Nic Ferrier
  0 siblings, 0 replies; only message in thread
From: Nic Ferrier @ 2003-10-22 20:04 UTC (permalink / raw)


I've written an HTTP server for guile/scheme. I want to use
threads. I want to create the threads from C (there are good reasons
for these decisions, believe me).

In effect what I want to do is this:


server.c

main ()
{
  init_guile();
  for (i = 0; i < 100; i++)
    make_thread(handler);
}

handler ()
{
  while (1)
    {
       get_mutex_lock();
       soc = accept(socket);
       release_mutex_lock();
       call_scheme_function(soc);
    }
}


I could do this kind of thing with Python, though the C pthreads would
have to register themselves with Python first.

The current trunk guile doesn't seem to work with threads created
outisde of guile and it isn't immediately obvious whether it's
possible to do at all...

I have worked my way through a little of the code, it seems like I'm
getting an exception in the garbage collector (but I'm not really
sure).


Can anyone give me a clue as to whether guile is supposed to support
threads created outside of the scheme environment?

If so are they expected to register with guile in some way?

If not, any basic overview of how I might add a registration system?



Nic Ferrier



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-10-22 20:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-22 20:04 threads from outside guile Nic Ferrier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).