add non-thread-safe and thread-safe examples using thread locks