[packagekit] Limiting to one extra thread

Richard Hughes hughsient at gmail.com
Fri Apr 25 09:25:10 PDT 2008


On Fri, 2008-04-25 at 16:17 +0200, Patryk Zawadzki wrote:
> It does need two threads ig you want the proper solution where one
> thread gets a prepared list of downloads in a sensible order and
> signals the other thread when a set is fully downloaded _while_ still
> downloading further sets and signalling them in the background.

In this case where the backend will be creating and destroying it's own
threads - wouldn't the backend be the correct place to do
g_thread_create() and g_thread_join() for this sort of thing?

My argument isn't that backends can't use more than one thread (because
they can) but only providing the interface for one thread to be cleaned
up when the backend does bad things, or to wait for when calling finish.

It's one to think on I think. Cheers for the input.

Richard.



More information about the PackageKit mailing list