[Top][All Lists]

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

Re: Return value of finished threads

From: Michael Albinus
Subject: Re: Return value of finished threads
Date: Sat, 21 Jul 2018 16:33:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Tom Tromey <address@hidden> writes:

> Michael> Yes, likely until a thread-join has happened. And a second
> Michael> thread-join on the same thread shall always return ni.
> I was wondering which semantics would be preferred here.
> Having each thread-join return the same result doesn't seem so bad either.

I have no strong preference. But returning the result only once has the
advantage, that you could remove all thread data from a dead thread,
once the result has been shown.

> Michael> How long do we keep the results of dead threads, for which no
> Michael> thread-join happens? Do we need a Lisp cleanup function, which purges
> Michael> all dead threads results? Or does this the GC, when no Lisp object 
> holds
> Michael> the dead thread any longer?
> I didn't look deeply but I think instead of mark_threads, alloc.c would
> need to mark any thread it runs across; and then mark_one_thread could
> handle exited threads specially.

This goes into the darkness I'm not familiar with.

> Michael> (Btw, I believe it will be much better when you implement this. It is
> Michael> still hard for me to read and modify threads.c)
> I will see if I can find some time.  But I think your patch is close so
> you should keep going :-)

Sure. I use my patch locally to work on Tramp threads, but I won't push
it upstream.

> Tom

Best regards, Michael.

reply via email to

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