How to call a global function from multiple threads in vb net
Posted on 2013-06-18
I'm using VB net (Visual Studio 2012) to program an application that runs several threads.
Each thread needs to send data to a log database.
I've created a function in a separate module, called SendToDBLog(strMessage), which sends text to the Database via a stored procedure.
Can each of the threads call this function without any issue or will they conflict?
Can my main program call this function without affecting any thread?
If this would cause problems, please explain why and how to do it properly!.
Many thanks Experts!