[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libguile thread safety
From: |
Panicz Maciej Godek |
Subject: |
Re: libguile thread safety |
Date: |
Sat, 4 Jan 2014 16:01:35 +0100 |
2014/1/4 Chris Vine <address@hidden>:
> There is something even more bizarre than as reported in the exchange
> with Maciej. The further test case below prints:
>
> Hello
> 20
> 20
>
> I would have expected:
>
> Hello
> 10
> 20
>
> It seems as if top level variables in code evaluated by scm_c_eval_string()
> are shared between concurrently running threads. Is this really the
> intended behaviour (it is a significant and unexpected usability
> restriction)? Maciej (I hope that is your first name) can you reproduce
> this?
Yes, I confirm that the output with my setup is
Hello
20
20
It indeed does seem that the threads share their top-level bindings on
guile's side, and I suppose that this is the intended behaviour. I
think that it can be easily adjusted with scm_eval_string_in_module,
i.e. if you provide a separate module for each thread.
Re: libguile thread safety, Mark H Weaver, 2014/01/03
- Re: libguile thread safety, Chris Vine, 2014/01/04
- Re: libguile thread safety, Chris Vine, 2014/01/04
- Re: libguile thread safety,
Panicz Maciej Godek <=
- Re: libguile thread safety, Chris Vine, 2014/01/04
- Re: libguile thread safety, Mark H Weaver, 2014/01/04
- Re: libguile thread safety, Chris Vine, 2014/01/04
- Re: libguile thread safety, Panicz Maciej Godek, 2014/01/04
- Re: libguile thread safety, Chris Vine, 2014/01/04
- Re: libguile thread safety, Panicz Maciej Godek, 2014/01/05
- Re: libguile thread safety, Mark H Weaver, 2014/01/05
Re: libguile thread safety, Ludovic Courtès, 2014/01/04