Hello!
I want to initialize a Class RouteObj, from an instance of the WebSocket Class PushB4A.
As it is mentioned from the server tutorials, WebSocket classes are natively multithreaded.
If I initialize the simple RouteObj Class with...
...where Some_Event is a PushB4A event, where the ro object will run? In the PushB4A thread or in its own thread?
Every RouteObj thread (if it will run in its own one) will have some queries, one timer one list filled with a custom type structure (for sorting) and one threadsafe map.
Is it a must to write Async Queries, especially for the heaviest ones?
Will the timer be accurate?
The map will be changed from whatever threads but no problem as it is threadsafe...
What about the list? Will the list have problem with access from multiple PushB4A threads?
In fact, the list will be changed from an event of PushB4A which will call another event of RouteObj with CallSubDelayed...
I could say that I want to run some "Inter-Thread" processes.
Thank you in advance!
I want to initialize a Class RouteObj, from an instance of the WebSocket Class PushB4A.
As it is mentioned from the server tutorials, WebSocket classes are natively multithreaded.
If I initialize the simple RouteObj Class with...
B4X:
Public Sub Some_Event(ACData As Map)
Try
Private RtID As String = ACData.Get("RouteID")
Private ro As RouteObj
ro.Initialize(RtID,ro)
Catch
Log("Some_Event: " & LastException)
End Try
End Sub
Every RouteObj thread (if it will run in its own one) will have some queries, one timer one list filled with a custom type structure (for sorting) and one threadsafe map.
Is it a must to write Async Queries, especially for the heaviest ones?
Will the timer be accurate?
The map will be changed from whatever threads but no problem as it is threadsafe...
What about the list? Will the list have problem with access from multiple PushB4A threads?
In fact, the list will be changed from an event of PushB4A which will call another event of RouteObj with CallSubDelayed...
I could say that I want to run some "Inter-Thread" processes.
Thank you in advance!