Entity Framework and multithreading

前端 未结 1 1095
时光取名叫无心
时光取名叫无心 2021-02-20 00:35

I have a WCF service that processes some messages. I use EntityFramework to retrieve the messages. I add these messages to a ThreadPool queue and then process them. After proces

相关标签:
1条回答
  • 2021-02-20 01:12

    Don't share an ObjectContext -- or any object attached to it -- between threads. It is documented to be non-thread-safe.

    0 讨论(0)
提交回复
热议问题