Subject: bug#63311: 30.0.50; [PATCH] smtpmail-send-it split

From: Eli Zaretskii <[email-masked]>
Date: Thu, 02 Nov 2023 13:26:02 +0200

> From: Manuel Giraud <[email-masked]>
> Cc: [email-masked]
> Date: Thu, 02 Nov 2023 11:44:40 +0100
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> [...]
> 
> > I think when messages are sent in the background, there should be a
> > different series of messages: one at the beginning, when the thread is
> > launched, and one when the thread exits.  Both of these should be
> > output by the main thread, not the thread which sends.
> 
> I think this is feasible for the message when the thread is launch but
> not for the final message: the main-thread would have to 'thread-join'
> on the sending thread and we'll lose the asynchronous behaviour, no?

That is not necessary.  The background thread could add the message to
some queue which the main thread could check from time to time.  Or
something similar.

> > When this is available, I will probably become a heavy user of this
> > feature.  It should probably be an opt-in feature initially, so as to
> > let people try it without disrupting their production workflows too
> > much.
> 
> Yes, I think it should be opt-in.  But such an option will also have
> ramifications in message.el, Gnus and surely more that I don't even know
> about.

Probably.  (Another client is sendmail.el.)

> (BTW, do you have an idea for a name for such option?)

smtpmail-send-message-in-background ?