ThreadManager problem


Author
Message
dgsoft
dgsoft
StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)
Group: StrataFrame Users
Posts: 93, Visits: 236
Hi,

I try to create new process for my method. The method must run a form asynchronically..



The code is





Public Class MKSServiceManager

Private pmks_ServiceStartProcessName = "MainServiceProcess"

Public WithEvents pmks_ThreadManager As MicroFour.StrataFrame.Threading.ThreadManager



Public Sub mmks_CreateService(ByVal tcPk_RecId As String)

...................

...................

' me.pmks_Service - is an object and mmks_execute is a Public Sub ...



pmks_ThreadManager.AddProcess(AddressOf Me.pmks_Service.mmks_execute, Me.pmks_ServiceStartProcessName)



Dim llExec As Boolean = pmks_ThreadManager.IsExecuting()

' There I can see llExec is True.. seems to executed..

End Sub



Private Sub _mmks_ThreadManager_ThreadStarted(ByVal e As MicroFour.StrataFrame.Threading.ThreadManagerEventArgs) Handles pmks_ThreadManager.ThreadStarted

'-- Add a line item to the 'Status' list box to notify the user that thread has started

Dim lnThreadStart As Boolean = True

End Sub



Private Sub _mmks_ThreadManager_ThreadCompleted(ByVal e As MicroFour.StrataFrame.Threading.ThreadManagerEventArgs) Handles pmks_ThreadManager.ThreadCompleted

If e.ThreadName = Me.pmks_ServiceStartProcessName Then

'Me.RunningModules.Add(Me.pmks_Service)

End If

End Sub





Private Sub _mmks_ThreadManager_AllThreadCompleted() Handles pmks_ThreadManager.AllThreadsCompleted

End Sub







There.. I set debugger inside the procedures and.. the code NEVER suspend there.. seems events never faired.. and of course.. my form also does not appears..

Also I put breakpoint into my mmks_execute() method.. and its also never happens..

Seems ThreadManager not able to execute my procedure? the question.. what made I wrong?



Thanks

Denis
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Have you looked at the ThreadManager sample that comes with the framework? It may help you better understand how it is to be used.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search