Are APIs of GHashTable multi-thread safe ?
- From: cee1 <fykcee1 gmail com>
- To: gtk-list gnome org
- Subject: Are APIs of GHashTable multi-thread safe ?
- Date: Sun, 10 May 2009 20:36:14 +0800
Hi all,
I'm studying some code snips of ghash.c (glib-2.20.1), and see the commet block in the beginning of ghash.c said it is MT safe, but some code seems not MT safe, e.g
g_hash_table_remove ->(calls) g_hash_table_remove_internal -> g_hash_table_remove_node
in the function g_hash_table_remove_node, line 344:
hash_table->nnodes--, ( not a atomic operation or protect by lock )
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]