On Wed, May 13, 2015 at 4:26 AM, Nick Wellnhofer <[email protected]> wrote:
> I created a new version of the branch that uses the more portable
> `sched_yield` defined by POSIX.

Nick++

>> The second is that the concurrency abstraction may not map to every host
>> elegantly. For example, under Go, running goroutines won't give us
>> thread-local storage to hold Err_error. But we can deal with each host
>> case-by-case and disable the test if necessary when the time comes.
>
> Yes, I’m aware that my branch breaks the Go bindings and that the general
> approach may be too Perl-centric.

Well, the idea of a global/thread-local error variable was inherited by Perl
from C's `errno`...

> Nevertheless, being able to run tests
> using threads from C is a nice feature and it already helped to discover a
> problem in the Perl bindings.
>
> It seems that supporting the global Err variable is a non-trivial issue for
> the Go bindings. In fact, Go doesn’t support thread-local storage, leading
> to clever hacks like this one:
>
>     https://github.com/jtolds/gls

I love that project!

    https://github.com/jtolds/gls#user-content-what-are-people-saying

    What are people saying?

        "Wow, that's horrifying."

        [...]

> Do you have any thoughts on how to address this issue?

I've been thinking hard about this problem over the last few days.  In the
short term, I think we should move the global error variable out of Clownfish
and into Lucy.  We can monkey patch the Clownfish namespace if need be for
compatibility's sake.

More in a separate thread...

> If it’s OK, I merge v2 of the branch as-is and leave the adjustments to the
> Go bindings to you.

The v2 branch looks good, and compiles and passes tests on my Mac laptop.  +1
to merge!

Marvin Humphrey

Reply via email to