Hi Ken
I know SyncLock. The problem is that I am not really sure if it is because
of multithreading. So I would like to output threadID or some other unique
thread info.
Is it possible?
Thanks,
Boni
"Ken Tucker [MVP]" <vb2ae@bellsouth.net> schrieb im Newsbeitrag
news:OBgGDsgsFHA.2948@TK2MSFTNGP15.phx.gbl...[color=blue]
> Hi,
>
> SyncLock prevents multiple threads from executing the same code at
> the same time.
>
>
http://msdn.microsoft.com/library/de...tmsynclock.asp
>
> Ken
> ---------------------------
> "Boni" <oilia@nospam> wrote in message
> news:OZgofYgsFHA.3216@TK2MSFTNGP12.phx.gbl...[color=green]
>> Dear all,
>> it seems that I have a multithreadng problem. I am not sure.
>> class A
>> UID as integer
>> shared ctr as integer=0
>> sub new()
>> UID=ctr
>> ctr+=1
>> end sub
>>
>> end
>>
>> Sometime I get 2 A objects with the same UID. I don't explicitely start
>> thread. Also it it possible that my class library is called from many
>> threads.
>> In order to find out, if it is really threading problem I need unique
>> some sort thread ID, which will be unique for each thread ?
>> But I can find only domainID in threading.thread.
>> Please is it possible to get some unique threadID or hashcode or
>> something else in .NET 1.1?
>>[/color]
>
>[/color]