Re: Pushing a NULL into g_async_queue
- From: James Henstridge <james jamesh id au>
- To: "Alan M. Evans" <ame1 extratech com>
- Cc: gtk-devel-list gnome org
- Subject: Re: Pushing a NULL into g_async_queue
- Date: Tue, 01 Mar 2005 14:19:17 +0800
Alan M. Evans wrote:
Hello all.
Is there some good reason for the prohibition on passing NULL data into
g_async_queue_push()? I checked the glib sources and the only reason I
could find is that data==NULL won't pass the g_return_if_fail(data)
test. What is the reason for this seemingly arbitrary limitation?
This question is probably better suited to gtk-list or
gtk-app-devel-list -- gtk-devel-list is for discussion of development of
GTK.
In answer to your question, consider the g_async_queue_try_pop() and
g_async_queue_timed_pop() functions. They will either return a value
from the queue, or NULL if no items exist. If you can store NULLs in
the queue, then the result becomes ambiguous.
James.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]