[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] chicken-fuse
From: |
Jörg F. Wittenberger |
Subject: |
Re: [Chicken-users] chicken-fuse |
Date: |
Fri, 04 Apr 2014 11:24:57 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux armv7l; rv:24.0) Gecko/20100101 Icedove/24.3.0 |
Hi Evan,
somehow I could not rest without *knowing* that C->Chicken calls are not
thread safe.
As I wrote yesterday I lived in the believe of this being a fact. Now I
re-read the manual section on callbacks.
According to my reading manual/Callbacks the 3rd paragraph in the
introduction confirms my understanding:
> Non-local exits leaving the scope of the invocation of a callback
from Scheme into C
> will not remove the C call-frame from the stack (and will result in a
memory
> leak). '''Note:''' The same applies to
> SRFI-18 threading, which is implemented with {{call/cc}};
> additionally, if you enter one callback, switch threads and then exit
> a different callback, your program is likely to crash.
Especially the "Note"-part seems to apply literally.
And that's in line with my observations: either make sure there is only
one thread handling fuse requests, or make sure replies come back before
thread switches occur.
Best Regards
/Jörg