You are locking in the second thread (or the 4th one, I can't tell). Just repeat the process in the other one, however its not the best way of doing it (possible race condition)
First, you should mark your variable as
volatile[
^], which tells the compiler that the object may be referenced from multiple threads. You really only need to do this if accessing from multiple threads at the same time (one counting blue pixels, one counting red, one writing orange ones, etc).
A better object to use other than the lock is to use an
AutoResetEvent[
^]. This can signal one thread to another that its done using the object. Otherwise you are playing with a race condition, where one thread gets to the resource before the other one has initialized it or you aren't sure which one gets there first.
You need to ensure that the second thread only uses the resource after its been set up by the other thread. The link above has an example on how to use the AutoResetEvent, you just watch for it in the second thread and the first thread signals that the resource is ready for the other thread.