Hi, I have encountered (for me) very strange problem. In my app, when pressing start button, all threads are activated, when pressing stop button, all threads are aborted and all collections are cleared. This is all happen at the main thread, while other procceses have their own threads or are running via threadpool. However, today I replaced ReaderWriterLock with ReaderWriterLockSlim and rarely, when I press "STOP" button the app will freeze. With Break all I can see the coed is stuck on the line this.someobject.TryEnterWriteLock(-1) and when I display details, the variables are all filled with this message:
"Cannot .... because current thread is in sleep,wait or join state"
I dont understand it - its the main application thread. I do not expect direct answer rather than advice what should I look for, this message I have never seen before. Thank you!