S
Steve McLellan
Hi,
I've just discovered that accessing Image.Height (and probably other
properties) in a multi-threaded environment can cause access problems (as a
test, you can spawn a hundred threads and get them all to perform a couple
of multiplications on an image's height and width ). I know I can prevent
simultaneous access, but is there any reason why Image can't be accessed
like this? And is this common for all .NET objects? I know the docs say 'not
thread-safe' but not being safe for multiple reads seems bizarre.
Steve
I've just discovered that accessing Image.Height (and probably other
properties) in a multi-threaded environment can cause access problems (as a
test, you can spawn a hundred threads and get them all to perform a couple
of multiplications on an image's height and width ). I know I can prevent
simultaneous access, but is there any reason why Image can't be accessed
like this? And is this common for all .NET objects? I know the docs say 'not
thread-safe' but not being safe for multiple reads seems bizarre.
Steve