Can I use the same lock object at two methods, accessed by two different threads? Goal is to make task1 and task2 thread safe.
object lockObject = new object
If you want to prevent different threads from performing task1 and task2 at the same time, then you must use the same lock object.
If the two tasks do not contend for the same resources, you could use different lock objects.