kohlehydrat
kohlehydrat

Reputation: 505

SwingWorkers stopped working

I'm having a very strange problem. I was working on an application using Swing, and of course I'm using SwingWorkers. They were working porperly until last night. I just ran the programm, but the workers stopped working from one run to the next. (I actually didn't change a single line of code). Was there some update or something else going on last night that could explain this strange behaviour?

I'm using JavaSE-1.6 on an OpenSuSE 11.1 box. I'm developing with Eclipse Galileo.

Upvotes: 1

Views: 269

Answers (2)

Virat Kadaru
Virat Kadaru

Reputation: 2256

two things I have learnt about SwingWorkers is

  1. Java will run only one swing worker at a time (they get queued)
  2. Once swing workers complete execution, you cannot use them again. You will have to create a new instance of the swing worker if you want to run them again.

Upvotes: 4

kohlehydrat
kohlehydrat

Reputation: 505

I think I have solved the problem on my own, here the solution if you're interested:

A change in the database I wasn't aware of increased the number of (dynamically created) SwingWorkers above 10, which is the maximum number of possible workers.

Upvotes: 1

Related Questions