there is a shared datastructure I'm using, and I want to make sure no 2 threads are altering it at the same time.
I have something like:
Sub1
Synclock Locker
do something with shared datastructure.
if (some condition) then sub 2
end synclock
end Sub
Sub2
Synclock Locker
do something with shared datastructure.
end Synclock
end Sub
My question is: would this impose a problem? because when sub 1 is being executed within the synclock, it could call sub 2, which also uses the synclock.
I have something like:
Sub1
Synclock Locker
do something with shared datastructure.
if (some condition) then sub 2
end synclock
end Sub
Sub2
Synclock Locker
do something with shared datastructure.
end Synclock
end Sub
My question is: would this impose a problem? because when sub 1 is being executed within the synclock, it could call sub 2, which also uses the synclock.
Comment