the main loop

sfora dim sfora.dim at gmail.com
Tue Sep 16 12:39:30 PDT 2008


On Mon, Sep 15, 2008 at 12:58 PM, Macartney, Geoff
<gmacartney at tycoint.com> wrote:
> I found Kimmo Hämäläinen's post below very useful in figuring out how to construct a main loop, just writing in C.
>
> http://lists.freedesktop.org/archives/dbus/2007-October/008859.html

Is it safe to use this main loop for both incoming and outgoing messges ?

I plan to run it in a dedicated thread and let other threads send
messages asynchronously..

Thank you very much for the help,
Sfora


>
> Cheers
> Geoff
>
>
>
>
> --------------------------------------------------------
>
> Tyco Safety Products/CEM Systems Ltd.
> Registered in Northern Ireland: NI 25728.  Registered Office: Unit 4 Ravenhill Business Park, Ravenhill Road, Belfast, BT6 8AW..
>
> Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. This email and any attachments are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender immediately and delete any copies in your possession.
>
> -----Original Message-----
>
> From: dbus-bounces at lists.freedesktop.org [mailto:dbus-bounces at lists.freedesktop.org] On Behalf Of sfora dim
> Sent: 15 September 2008 10:51
> To: Thiago Macieira
> Cc: dbus at lists.freedesktop.org
> Subject: Re: the main loop
>
> Hi Thiago,
>
> On Mon, Sep 15, 2008 at 9:26 AM, Thiago Macieira <thiago at kde.org> wrote:
>>>Or is it the application's (which is using dbus) main loop ? the one
>>>that periodically calls dbus_connection_read_write() to check if new
>>>msgs have arrived ?
>>
>> Applications wouldn't call dbus_connection_read_write().
>
> I'm writing a dbus service in C using libdbus. What dbus function
> should I call periodically in my main loop ?
>
> I thought I should call dbus_connection_read_write() because that's
> what dbus-example.c
> (http://dbus.freedesktop.org/doc/dbus/dbus-example.c) use in its main
> loop (in the listen mode)...
>
> Thank you,
> Sfora.
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
>


More information about the dbus mailing list