C
Chris
Hi,
I did a bit of research and read some articles (mostly from the msdn)
about threading in dotnet cf. When the user is viewing records, the
most useful data is loaded onto the first screen then the app kicks
off background threads which load the rest of the information located
on other forms so records can be scrolled faster. I am using the code
below to create the threads:
Dim f1starter As ThreadStart = New ThreadStart(AddressOf func1)
Dim c As Thread = New Thread(f1starter)
c.Start()
Dim f2starter As ThreadStart = New ThreadStart(AddressOf func2)
Dim b As Thread = New Thread(f2starter)
b.Start()
My only problem with this method, or atleast that i can see, is that
if the user clicks 'next' a few times quickly so the threads havent
finished, new threads will be started while the other ones are going
so it will eventually cause a backlog of threads. Does anyone know of
any ways to stop this or even a better way of doing this?
Thanks
Chris
I did a bit of research and read some articles (mostly from the msdn)
about threading in dotnet cf. When the user is viewing records, the
most useful data is loaded onto the first screen then the app kicks
off background threads which load the rest of the information located
on other forms so records can be scrolled faster. I am using the code
below to create the threads:
Dim f1starter As ThreadStart = New ThreadStart(AddressOf func1)
Dim c As Thread = New Thread(f1starter)
c.Start()
Dim f2starter As ThreadStart = New ThreadStart(AddressOf func2)
Dim b As Thread = New Thread(f2starter)
b.Start()
My only problem with this method, or atleast that i can see, is that
if the user clicks 'next' a few times quickly so the threads havent
finished, new threads will be started while the other ones are going
so it will eventually cause a backlog of threads. Does anyone know of
any ways to stop this or even a better way of doing this?
Thanks
Chris