Re: GTK Serial I/O Questions



"Dmitry Ponomaryov" <eagleowl comail ru> writes:
   Is there any advantages of (gtk_editable_get_chars(), g_io_add_watch()
and so on)
  before standart socket's API (I mean connect/bind/lsiten...)?

 [ g_io_add_wath is sellect() or poll() and so on.. why I should use GTK
warppers?]


Because GTK is going to block in poll() waiting for events from the X
server, and if you block in a different poll() the GUI will lock
up. g_io_add_watch() adds a file descriptor to the existing poll(),
so you only have one poll() and nothing locks up.

i.e. you want to have a single main loop that runs always, rather than
switching back and forth between two main loops and locking up the
other main loop in between.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]