/* Vala Lock Example */
using GLib;

public class Sample : GLib.Object {

        private int critical_data;

        public void inc () {
                
                lock (critical_data) {
                        critical_data++;
                }
        }

        static void main (string[] args) {
                
                var sample = new Sample ();
                sample.inc ();
        }
}
