Re: signals and threads



Dmitry A. Yanko wrote:
[...]
Its better to use the gthread api only; while using pthreads directly
might work, it wont be portable & it wont be garaunteed to work
properly either.

Ok. What about a sockets and file io? Glib has such support, but
it's more convenient for me to make direct calls sometimes.

Glib offers portability where it can in regards to IO & convenience
code that allows you to insert IO events into the main loop
(GIOWatches), which is usefull.

I could see the possibility of breakage if your using
both g_io_channel_read/write & read/write routines
on the same file desctiptor (maybe file offsets will get skewed ?).

Probably everything will go fine, but IMO using two seperate APIs
to achieve the same results in the same program and mixing them
up is asking for trouble.

Cheers,
                       -Tristan




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