[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-dbus
Subject:    dbus_connection_read_write_dispatch problem
From:       Eugene Gorodinsky <e.gorodinsky () gmail ! com>
Date:       2009-08-01 16:36:18
Message-ID: b28b6cf70908010936q201d36f3la0ac84a328ee4afb () mail ! gmail ! com
[Download RAW message or body]

The documentation says the function will block for the amount of
milliseconds passed to it as a second argument. Thus the test program
below should exit after about 5 seconds. That isn't happening. Am I
reading the documentation wrong?


#include <dbus/dbus.h>
#include <time.h>

int main()
{
    DBusConnection *connection;
    connection = dbus_bus_get(DBUS_BUS_SESSION,NULL);
    if (connection)
    {
        while (clock()/CLOCKS_PER_SEC<5)
        {
            dbus_connection_read_write_dispatch(connection, 50);
        }
    }
    return 0;
}
_______________________________________________
dbus mailing list
dbus@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dbus
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic