After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 532329 - Use recursive mutex for lock statements
Use recursive mutex for lock statements
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Code Generator
0.3.x
Other All
: Normal normal
: ---
Assigned To: Philip Van Hoof
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-09 12:02 UTC by Jürg Billeter
Modified: 2008-05-23 21:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Code!!! (5.05 KB, patch)
2008-05-23 21:16 UTC, Philip Van Hoof
none Details | Review
Beter code!!! (4.96 KB, patch)
2008-05-23 21:24 UTC, Philip Van Hoof
committed Details | Review

Description Jürg Billeter 2008-05-09 12:02:51 UTC
We currently use GMutex for lock statements, however, this is not guaranteed to be a recursive lock, which would make sense for lock statements (it's recursive in C#). We should switch to GStaticRecMutex, as this is guaranteed to be recursive and it will also work for instance fields.
Comment 1 Philip Van Hoof 2008-05-23 21:16:22 UTC
Created attachment 111438 [details] [review]
Code!!! 

One of those few times Philip actually coded something for Vala instead of whining at Jürg so that he codes it for Philip. This time he, me, implemented the recursive locking for Vala.

:-)
Comment 2 Philip Van Hoof 2008-05-23 21:24:52 UTC
Created attachment 111439 [details] [review]
Beter code!!!

Same thing, better
Comment 3 Jürg Billeter 2008-05-23 21:41:45 UTC
2008-05-23  Jürg Billeter  <j@bitron.ch>

	* vapi/glib-2.0.vapi:
	* gobject/valaccodegenerator.vala: 

	Use GStaticRecMutex for lock statements,
	patch by Philip Van Hoof, fixes bug 532329

Fixed in r1417.