Illegal monitor state exception

前端 未结 1 946
孤独总比滥情好
孤独总比滥情好 2021-01-16 21:50

How to pass the polling thread to another thread for processing. The program execution beings in a controller class which has a main method and a thread pool:

The ma

相关标签:
1条回答
  • 2021-01-16 21:56

    You need to read something like this first. You cannot use wait() without holding the object's monitor. Also, from a short glance, it looks like you use a non-final static member in a multithreading context. Try to make that thread-safe.

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