[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GNUnet-developers] scheduler patch
From: |
Christian Grothoff |
Subject: |
Re: [GNUnet-developers] scheduler patch |
Date: |
Tue, 26 Nov 2013 20:09:31 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 |
On 11/26/13 05:30, Andrew Cann wrote:
>> First of all, I cannot download the diff.
>
> Strange, it's working from my end. Maybe my VPS was down. I've attached to
> this
> email.
>
>> However, more importantly,
>> what do you think you get by "monitoring exceptions on file
>> descriptors"? If your patch looks at the 'except' set in 'select',
>> that's for TCP urgent data, which is likely not what you want (won't
>> work for files).
>
> Yes that's all it's doing. To integrate DBus with your program's main loop you
> give DBus a callback that it calls with file descriptors that it wants you to
> select() for reads, writes and exceptions, then pass them back when they're
> ready. DBus doesn't use out-of-band packets though so maybe I don't need to
> use
> the except set.
Right, I don't see why DBus would need it either.
> There was a few places in the code though where it looked like this feature
> was
> /supposed/ to be there but never got round to being implemented. For example
> GNUNET_SCHEDULER_set_select takes a function that takes an argument for an
> except set, but then only gets passed NULL. There's a few bits of code which
> call GNUNET_SCHEDULER_add_select that create an except set and then destroy it
> without using it.
>
> Anyway, GNUNET_SCHEDULER_add_select can take an exception set now - if you
> want
> it.
Not really ;-). Also, if we ever need it in the future, I'd add a
"GNUNET_SCHEDULER_add_select_with_except" function for this special case
anyway, instead of passing an extra argument in various places that have
no use for it. But I don't really see this happening either.
Happy hacking!
Christian