Hi, I am writing some code that needs to process very quickly, during this process I need to log actions & its progress.
I am new to async (multi threading) & wanted some help creating a
log function that can be called from my main code loop so it wouldn't
slow it down.
Can anyone point me in the direction of a good article that has a real
world example of how to create an async function & pass in
parameters (or post code)?
example of what i am trying to do:
Public Sub DoSomeWork()
for each item as Object in AListOfObjects
'//Do some processing with this object
SharedObject.WriteToLog("Object #" & Object.Id.ToString,"status","OK")
'// prehaps some more code
Next
'// perhaps some more code here too
End Sub
'In a global shared class
Public Shared Sub WriteToLog(objectId as string, status as string,result as string)
'// this call needs to be async so the calling code can continue without having to wait for this to complete
End Sub
Any help is much appreciated.
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).