Re: g_string_x thread safety?



On Tuesday, May 15, 2001, at 01:35  PM, Michael Rothwell wrote:

I'm using gnome-vfs, which uses pthreads, to fetch data from various places, and call a callback in my gtk program to update a display. It keeps crashing in the g_string* functions (append, truncate) if there is more than one thread. I assume I should use the glib threading stuff to protect my callback, based on the behavior I'm seeing. But I wanted to bounce it off the list to see if anyone else had any thoughts on this (i.
e., bug or feature)?

gnome-vfs does all callbacks on the main thread, even though it does work with multiple threads. Your program is never exposed to the thread safety issues. Using the glib threading stuff is unnecessary and will not protect you. It's some other bug in your code, I'm assuming.

    -- Darin




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