gpollable: Clarify that can_poll() must be called before other methods
Both GPollableInputStream
and GPollableOutputStream
are dynamic
interfaces, in that their implementation on a class may only be
functional if certain prerequisites are met at runtime. For example,
a GConverterInputStream
is only pollable if its base stream is
pollable, and that’s determined at runtime rather than compile time.
As such, both interfaces have a can_poll()
method. If that method
returns FALSE
, the behaviour of all other methods on the interface is
undefined.
That was mentioned in the documentation for can_poll()
, but not any of
the other documentation for the interfaces, which made it a bit hard to
find.
Mention it more widely.
Signed-off-by: Philip Withnall pwithnall@endlessos.org
Fixes: #2952 (closed)
Closes #2952 (closed)