Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BeginInvoke() hangs....?
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
BeginInvoke() hangs....?
Miscellaneous
Thread ID:
01152819
Message ID:
01152819
Views:
69
Ok, worked in VS2003, but in VS2005 I have a little issue, actually a big issue since I can't get any further. I am trying to call a method on a new thread using BeginInvoke, but when the compiler executes
the BeginInvoke() method, the system inexplicably hangs...I am totally baffled.

Here is the code:
'***************************************
' Delegate Routines
'***************************************
Delegate Sub RetrieveValidDatabases_Threaded(ByRef objSelectedDatabase As ClassLibrary.SQLDBWrapper, _
 ByRef objParent As Object, ByRef objListObject As Object,  ByRef objWaitEvent As Threading.AutoResetEvent)

.
.
.

'***************************************
' Retrieve List Of Valid Databases In This Server
'   This Method Can Be Time-Consuming And Has Been Threaded
'***************************************
Dim objGetDBListThread As New RetrieveValidDatabases_Threaded(AddressOf App.RetrieveValidDatabases)
objGetDBListThread.BeginInvoke(Me.objSelectedDatabase, _
 Me, CType(listDatabases, Object), Me._objWaitEvent, Nothing, Nothing)

.
.
.

Public Sub RetrieveValidDatabases(ByRef objSelectedDatabase As ClassLibrary.SQLDBWrapper, _
 ByRef objParent As Object, ByRef objListObject As Object,  ByRef objParentWaitEvent As Threading.AutoResetEvent)
.
.
.
End Sub
Is there something wrong with my usage of BeginInvoke? I stepped through the code, and the method being called using the Invoke, never seems to run, the system literally hangs at the execution of BeginInvoke().
________________________
Ben Santiago, MCP & A+
Programmer Analyst (SQL, FoxPro, VB, VB.Net, Java, HTML, ASP, JSP, VBS)
Eastern Suffolk BOCES - Student Data Services


Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
-Rich Cook
Next
Reply
Map
View

Click here to load this message in the networking platform