On Mon, 13.04.15 14:37, Tomasz Bursztyka (tomasz.burszt...@linux.intel.com) 
wrote:

> Hi Lennart and Marcel,
> 
> I'll stick to the thread solution for now, moving the dbus handling in the
> main process.
> I forgot to check about this issue.

I think the cancellation issue should not be ignored. Doing this as
thread is not really an option if we cannot cancel this properly after
a timeout.

I don't see why an out-of-process logic would be that hard... It could
be implemented in a pretty minimalistic way: create an
AF_UNIX/SOCK_SEQPACKET socket before forking, leave one end of it in
the daemon, and pass the other end to all the worker processes. Then,
when there's an URL to look up, just write it in one datagram into the
socket from the daemon side, and wait for one reply on it. Make all
worker threads read() from the other side (the same socket in all of
them), and the kernel will then deliver it to an idle worker thread
and all is good.

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to