B4J Question B4J BackgroundWorker or Timer?

tchart

Well-Known Member
Licensed User
Longtime User
I have a non-ui application which runs as a service.

Currently the application includes a web server (jServer) but this isnt required anymore so I would like to remove it from the project BUT I have a number of BackgroundWorkers configured to perform some tasks and I was considering changing these to be Timers.

Would there be any issues running Timers instead of BackgroundWorkers? The BackgroundWorkers run on different intervals but may on occasion run at the same time.

Are timers run in their own thread? I suspect not as I'd need to create them in the main thread?

I did read the thread below but it wasnt exaclty clear as the OP was asking about running 1000 timers and @Erel suggested using BackgroundWorkers.

 
Last edited:
Top