Multithreading when working with database
10:22 Sep 29, 2020
I'd like to use Parallel to do some database tasks. But when I follow this article, I see that the second example is one thread only.
How should I do to work with multithreading?
Hello Van Ly,
Using several streams in working with the database via UserConnection may cause issues in starting synchronization or committing transactions. You cannot call the DBExecutor instance methods in the parallel threads. It is recommended to make sure that the call of DBExecutor instance methods is performed consistently in one thread.
Please, let us know in case any further information is required.
Show all comments