Page 1 of 1

LinqConnect Professional Version 4.1.184 (07-Feb-2013) - access from two and more thread.

Posted: Tue 26 Feb 2013 15:27
by AKRRKA
We use some threads for parallel operations such as load data to user interface end store data from external source. Both threads use same one data context. When threads work with database simultaneously an exception "Net packets out of order" raised.
What do we wrong?

By sample:

Code: Select all

{"Net packets out of order: received[0], expected[7]"}
   в Devart.Data.MySql.av.a()
   в Devart.Data.MySql.av.i()
   в Devart.Data.MySql.al.c()
   в Devart.Data.MySql.al.a(Byte[]& A_0)
   в Devart.Data.MySql.MySqlDataReader.Read()
   в Devart.Data.Linq.Engine.ObjectReader`1.e()
How to work from different threads with a single context?
Please give an example as a small application.

Re: LinqConnect Professional Version 4.1.184 (07-Feb-2013) - access from two and more thread.

Posted: Wed 27 Feb 2013 15:56
by StanislavK
Could you please describe the purpose of using the same context in multiple threads? Generally, the DataContext object is not thread-safe, at least because the underlying connection object is not.

Please describe this scenario in more details, so that we are able to further investigate the issue. If possible, please send us a small test project with which the problem can be reproduced.

Re: LinqConnect Professional Version 4.1.184 (07-Feb-2013) - access from two and more thread.

Posted: Thu 28 Feb 2013 12:45
by AKRRKA
Well, than we will use separate data contexts for different threads.
Thanks!