Re: [gmime-devel] using gmime in a multithreaded application



On 03/19/2010 10:51 PM, Dan Streit wrote:
> Hello,
>
> I'm trying to use gmime in a multi threaded application but I am
> experience some segfaults when starting a lot of worker threads.
>
> [snip]
>
> Am I doing something wrong or is this possibly an environment issue?

You probably need to initialize glib with thread support so that it
knows to lock inside it's memory allocator.

g_thread_init (NULL); ought to do it

http://library.gnome.org/devel/glib/stable/glib-Threads.html#g-thread-init

Jeff



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