Re: Automatic Refresh for local Maildir's mail counts?

Linux-Fan <Ma_Sys.ma-S0/[email protected]> Sun, 1 Jan 2017 23:15:02 +0100
Newsgroups gmane.mail.cone
Message-ID <[email protected]>
--===============9207179123087683792==
Content-Type: multipart/signed; micalg=pgp-sha256;
	boundary="Sig_/DQCa4BCTvbpS.lvz7w4XuyM";
	protocol="application/pgp-signature"

--Sig_/DQCa4BCTvbpS.lvz7w4XuyM
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

[Sat, 31 Dec 2016 12:27:38 -0500] Sam Varshavchik
<[email protected]> wrote:
> Linux-Fan writes:
>=20
> > > If you do not have a folder open, but looking at the folder
> > > hierarchy, the message counts are not going to get updated in
> > > realtime. There's no facility to do that.

[...]

> > Is it possible/planned to add a means of updating the message counts
> > from the folder hierarchy view automatically as well (similar to
> > what I did upon receiving a SIGUSR1 for my proof-of-concept patch
> > from the previous mail)?
>=20
> I'm open to such a feature; however this approach won't work. Signals

[...]

> The only safe way to do this: in addition to installing a signal
> handler, an internal pipe needs to be created, and put into
> nonblocking mode. The only thing the signal handler does is write a
> byte to the pipe, ignoring the results, and immediately terminating.
>=20
> Then, on the folder screen only, in addition to handling all the
> regular events the read end of the pipe gets polled as well, and when
> something is read, what your patch does would happen.

OK. I am going to check this out when I find time to dig into the
source code again :) How about the other option: Just extending the (as
far as I understand it) existing event polling to also check for new
messages every NN seconds or such? I do not like polling that much but
in this case it sounds easier and probably more reliable?

> Even with that, things may not work 100%. All the code needs to be
> audited and verified that it'll correctly handle an interrupted
> system call.
>
> Correct signal handling is hard.

Yes it is :( Especially signal handling from within multithreaded
applications is probably asking for trouble, so I understand that might
not be the best solution here...

Thank you for the quick and thorough reply, I really appreciate it.

Happy new year to all list members :) !

Yours Sincerely
Linux-Fan

--=20
http://masysma.lima-city.de/

--Sig_/DQCa4BCTvbpS.lvz7w4XuyM
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJYaX9qAAoJEPhJcO2yngi1+ecP/1UKyBG2hoM1ulqRctixidOs
a2n//wx59UChasP3UaD5UCTT0tLaTGdbZ9VUIfxP/yL/ha8cvr6WG5j6nLgFzGNg
1Uxhz8Lmwk3sPOYginhZQFDwQaJMhvd3G/HJYdRio+r06YkVHrzESufgQKvQHFvR
62qUL9GAf6l/Aq1Uhc7xeHG7cDCQTp1jnWGBgc3/eYysA8WJdP8WxRzPPFoAcbLR
MdJM72cpF8UaRsBRDltKNKOTQSP9rfAfpm7DGgocTJUQgIn3fMMCciMeXo6kxOkT
1NY42/UguZgAXI7G+M/d2e79pxatl1nPGRAR7YbEKe1CRik+uLJUqAkIALM0fPCk
Gnrw9k+U6365s4U0KMV3V7jwk+CbpHVdJtxuZtHEyKlqzfk26HSo9jlpa22z22b1
7kjoWnoSRMGIkr1K9SGNTpvWtYhevRB/zzPFQtE0NvYqnwm1QAjJQQ4KchkUsLzR
2DRBpYALUGnMZZhc+3kdLGWdKuDe01Mcqz3FRD1zuLLJr4GoiksxIEB7Y0QavTbA
m9zL6DkHHcC6XicOyhvVXllXnh5yv+KFH4utHpX1Gr49ALb/SftMzYFh/rXfeBfs
bdk+BoXhbsaAljhDcfrc+vuk/piHy9l35l8N34ICrg6Bkee9p1544vn+xfIN6BEc
l2EtCygdsyWewkeeAKX4
=iIgM
-----END PGP SIGNATURE-----

--Sig_/DQCa4BCTvbpS.lvz7w4XuyM--


--===============9207179123087683792==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
--===============9207179123087683792==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Courier-cone mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-cone

--===============9207179123087683792==--