Using GAllocator in a multi-threaded environment



Hi,

I was happily using GQueue which seemed to be doing it's job right. When
I applied another GQueue running from a different thread, I started
getting sometime segmentation fault from the function _g_list_alloc - 
(In the line 	  current_allocator->free_lists->data = list->next; )

I didn't use GAllocator with any of the GQueue (actually, didn't use
this functionality at all). I am using GLib 2.0

I would like to know:
How do one work with GQueue in a multi-threaded environment: 
(I want to use several GQueues or GLists, with different GAllocators,
running in a multi-threaded environment). Since the current allocator is
static in the lib code, is it even possible without locking? Is there
some way to use a non-static allocator?

Thanks in advance,

Beni.


 





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