* bug#26858: Cygwin port of Guile 2.2
[not found] ` <87shkdrgpz.fsf@pobox.com>
@ 2017-05-09 19:26 ` Glenn Morris
[not found] ` <878tm26u4t.fsf@priss.frightenedpiglet.com>
1 sibling, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2017-05-09 19:26 UTC (permalink / raw)
To: Andy Wingo; +Cc: 26858
(Reported reassigned to guile)
Andy Wingo wrote:
> Bcc'ing bug-guile to create a bug for that.
FYI: if you use bcc, the system has no idea which package to associate
your bug report with. So you must specify "Package: guile" in the first
line of the body.
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#26858: Cygwin port of Guile 2.2
[not found] ` <878tm26u4t.fsf@priss.frightenedpiglet.com>
@ 2017-05-15 20:06 ` Andy Wingo
0 siblings, 0 replies; 2+ messages in thread
From: Andy Wingo @ 2017-05-15 20:06 UTC (permalink / raw)
To: Derek Upham; +Cc: 26858, guile-devel
Greets,
On Fri 12 May 2017 16:13, Derek Upham <sand@blarg.net> writes:
> Andy Wingo <wingo@pobox.com> writes:
>
>> scm_join_thread isn't actually implemented in terms of
>> scm_i_pthread_join any more. Probably that's what's going wrong here --
>> and probably that should be fixed to ensure that we actually join the
>> thread. (Otherwise it would be a memory leak too AFAIU.) Bcc'ing
>> bug-guile to create a bug for that.
>
> I noticed that scm_join_thread was calling back into Scheme-land. Are these statements all correct?
>
> - We are using call-with-new-thread underneath the hood.
Underneath the hood of what? :)
> - call-with-new-thread is documented to return a Scheme object from a
> thunk/handler. Any underlying pthreads should be implementation
> details.
Correct. In practice call-with-new-thread will create a pthread but I
can imagine circumstances in which it might (in the future) spawn an
auxiliary pthread for some reason, and I wouldn't want to rule that out.
> - The spawned thread sends the Scheme object to the condition variable
> as soon as the user thunk exits. Any number of operations can happen
> afterwards; the thread is still running in Scheme-land at this point,
> in call-with-new-thread’s wrapping thunk.
> - join-thread waits on the condition variable only.
These are implementation details. They are correct but probably the
implementation should change to do the scm_i_pthread_join and we should
guarantee that after the join, the thread is really dead. This is bug
26858.
> So at the end of join-thread we need to add a call to
> scm_i_pthread_join (which we implement in threads.c) to ensure that
> the pthread is completely gone before that join-thread returns. Is
> that accurate?
Well... yes, but we have to ensure that we call scm_i_pthread_join at
most once. I think calling pthread_join twice on a thread is
undefined. So there are some gnarlies here. Need to fix this.
> Unfortunately, I think the GC threads are going to end up being
> immovable objects in the path to full process-form support.
You can disable marker threads with the GC_MARKERS environment variable,
and the finalization thread should come and go as needed. Probably this
is not a blocker from your POV. Signal handling is probably the most
serious issue; perhaps we can avoid the thread somehow, since we handle
signals asynchronously anyway..
Andy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-15 20:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <874ly49l54.fsf@joshua.spikycactus.dnsalias.com>
[not found] ` <87lgr38jzd.fsf@pobox.com>
[not found] ` <87pogft8c2.fsf@priss.frightenedpiglet.com>
[not found] ` <878tmz7945.fsf@pobox.com>
[not found] ` <87ziffcbwg.fsf@priss.frightenedpiglet.com>
[not found] ` <87ziew4836.fsf@priss.frightenedpiglet.com>
[not found] ` <8760hjt5k0.fsf@pobox.com>
[not found] ` <87r306d3vx.fsf@priss.frightenedpiglet.com>
[not found] ` <87lgqes375.fsf@pobox.com>
[not found] ` <87efw681hv.fsf@priss.frightenedpiglet.com>
[not found] ` <87shkdrgpz.fsf@pobox.com>
2017-05-09 19:26 ` bug#26858: Cygwin port of Guile 2.2 Glenn Morris
[not found] ` <878tm26u4t.fsf@priss.frightenedpiglet.com>
2017-05-15 20:06 ` Andy Wingo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).