chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Re: An alternative thread system?


From: Shawn Rutledge
Subject: Re: [Chicken-users] Re: An alternative thread system?
Date: Mon, 11 Aug 2008 19:40:29 -0700

On Mon, Aug 11, 2008 at 2:39 PM, Aleksej Saushev <address@hidden> wrote:
> Your attitude to threads is just a prejudice with no support behind it.

I'm not completely afraid of threads, I've used them.  (Have
experienced some of the usual problems with using them, too.)  I'm
just trying to justify to myself that maybe it's OK to live without
them, since it's allegedly so daunting to get Chicken to support them
in a reliable way.

> Most overhead originates not from fork, it comes from copying and IPC.
> Passing data between threads may be as simple, as assignment. Note:

Of course.

> no context switch involved. Passing data between processes is almost
> always two context switches, synchronization in kernel, and copying
> passed data at least twice, unless you use some very system-specific
> hack. Sometimes you can avoid redundant copying by mmaping common file,
> which still brings you to shared-memory and all the stuff connected.

I don't have experience with shmget() etc. but what's so terrible about it?




reply via email to

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