chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] multithreading


From: felix
Subject: Re: [Chicken-users] multithreading
Date: Thu, 17 Jun 2004 07:03:53 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113

Daniel Goertzen wrote:

I've been searching for a while now for a scheme/lisp that is suitable for
embedded hardware AND supports multithreading.  I note that chicken supports
srfc 18, however I also note that all threads will block if any thread
blocks, and I cannot accept this.

Is there any knowledge out there on how chicken will react if I go ahead and
start creating new threads with C pthread calls?  Will the runtime go down
in a blazing wreck?  Are the support libraries generally thread unsafe?


The runtime system is generally not thread safe. Since the C stack is used
extensively as a system-wide storage allocation area, multiple threads
(and as such multiple stacks) will massively confuse the garbage collector.
Moreover the runtime-system uses several global storage areas, so there
will be trouble waiting, too.
So, if possible, one should uses multiple communicating processes instead
of threads, if safe blocking behaviour is required.

So that doesn't help you at all. With a lot of effort it might be possible
to change all that, but it's definitely something that can be achieved
easily.


cheers,
felix





reply via email to

[Prev in Thread] Current Thread [Next in Thread]