Re: GLib source id wrap around
- From: Havoc Pennington <hp redhat com>
- To: Max Krasnyansky <maxk qualcomm com>
- Cc: gtk-devel-list gnome org
- Subject: Re: GLib source id wrap around
- Date: Mon, 13 Oct 2003 15:08:53 -0400
On Thu, 2003-10-09 at 20:51, Max Krasnyansky wrote:
> I'd say we need to add something like following to that function.
> /* Handle wrap around. id 0 is invalid */
> if (!context->next_id)
> context->next_id = 1;
That doesn't do any good, because it doesn't keep you from colliding
with existing source IDs. To make wraparound work you would need to keep
track of all outstanding IDs and pick the next unused one.
The current assumption is simply that wraparound won't happen.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]