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

List:       gtk
Subject:    Re: g_io_channel_win32_poll() Problem on Windows
From:       LRN <lrn1986 () gmail ! com>
Date:       2017-08-02 16:44:36
Message-ID: 550304d9-4ef8-829f-8a4e-a456347c2acb () gmail ! com
[Download RAW message or body]

On 8/2/2017 7:37 PM, LRN wrote:
> On 7/27/2017 1:51 PM, mualloc . wrote:
> > arv_gv_discover_socket_list_send_discover_packet(socket_list);
> > 
> > 
> > do{
> > 
> > #ifdef_WIN32
> > 
> > // g_io_channel_win32_make _pollfd() documentation says call this
> > 
> > if(g_io_channel_win32_poll(socket_list->poll_fds,socket_list->n_sockets,ARV_GV_INTERFACE_DISCOVERY_TIMEOUT_MS)==0)
> >  
> > 
> > #else
> > 
> > if(g_poll(socket_list->poll_fds,socket_list->n_sockets,ARV_GV_INTERFACE_DISCOVERY_TIMEOUT_MS)==0)
> >  
> > #endif
> > 
> 

I recently committed a W32 g_poll() test to glib git master. You can find it
here[1].
If you look closely, you'll realize that g_poll() does almost nothing - it's
just a glorified WaitForMultipleObjectsEx(). All the magic happens in GSource
implementation, and that's what you must use, unless you're willing to do what
i did in that test and do all the pre- and post-processing yourself. Note that
i omitted a lot of corner cases in the test though.

[1]
https://git.gnome.org/browse/glib/commit/?id=425a9f5864f69f804f11279b558ff925d421b546


-- 
O< ascii ribbon - stop html email! - http://arc.pasp.de/
_______________________________________________
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


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

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