I have a messaging aspect of my application using Jabber-net (an XMPP library.)
What I would like to do, if for some reason the connection to the Server is ended, is keep trying to connect every minute or so.
If I start a Timer to wait for a period of time before the next attempt, does that timer run asynchronously and the resulting Tick event join the main thread, or would I need to start my own thread and start the timer from within there?
What kind of timer are you using?
System.Windows.Forms.Timerwill execute in the UI threadSystem.Timers.Timerexecutes in a thread-pool thread unless you specify aSynchronizingObjectSystem.Threading.Timerexecutes its callback in a thread-pool threadIn all cases, the timer itself will be asynchronous – it won’t ‘take up’ a thread until it fires.