unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Multithreaded access
@ 2009-11-23 11:07 Peter Wang
  2009-11-24  2:11 ` Carl Worth
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Wang @ 2009-11-23 11:07 UTC (permalink / raw)
  To: notmuch

Hi,

I am also toying around with a curses frontend for notmuch :-)
One thing that I would really like to have is asynchronous search:
I should be able to begin reading mail even while search results
are rolling in.

At the moment I'm using one read-only database_t* and creating multiple
queries off it.  There's a background thread[1] slurping up <n> search
results at a time, then passes them to the main thread.  The main thread
also handles the pager.  When the user goes to open a thread, it creates
a separate query_t so that it can look up the messages and their headers
and filenames.

It seems to work, but sometimes crashes.  I'm wondering if there is
something inherently wrong with this design, so that I should try a
different approach.

A future concern is how to handle tag updates.  Could I open the database
for writing in one thread, and read-only in another?

Peter

[1] Actually, I am playing around with Go at the same time so they are
really goroutines.  Any problems could very well be related to this.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-24  2:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-23 11:07 Multithreaded access Peter Wang
2009-11-24  2:11 ` Carl Worth

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

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).