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

List:       freedesktop-dbus
Subject:    dbus_pending_call_set_notify race
From:       Alexander Larsson <alexl () redhat ! com>
Date:       2006-11-30 14:50:39
Message-ID: 1164898239.6492.27.camel () greebo
[Download RAW message or body]

I just found something i think is racy in the dbus API.

I'm calling dbus_connection_send_with_reply(), possibly not on the same
thread as the mainloop. This queues the message for delivery. It also
returns a DBusPendingCall so i can track recieving the message.

However, what if the mainloop gets scheduled and gets a reply before I
call dbus_pending_call_set_notify. Won't this mean I will miss the
callback? Maybe it should detect that case and call the function (from
an idle (==timeout of zero))?

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl@redhat.com    alla@lysator.liu.se 
He's a fiendish Republican astronaut from the 'hood. She's a tortured 
thirtysomething fairy princess with a song in her heart and a spring in her 
step. They fight crime! 


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

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