Does anyone know of an alternative way to prevent a console service application from exiting than using DoEvents in a while loop in the App Run Event Handler?
Until I’ve found an alternative; Xojo 2024R3.1 is unusable for me.
For threads this indeed has alway been the only correct way. For console apps, that need to keep running, DoEvents in a loop in the main Run Event seems to be the only way to keep an app alive…
Thread.Sleep, Thread.SleepCurrent, and DoEvents are quite messed up right now in 2024r3(.1), Although, from my testing, this is only the case with 1 or more preemptive threads active. I won’t be using 2024r3(.1) until threading is stable again. I already have issues with 2024r2.1 and don’t need to add any more. (Offending code in 2024r2.1 does not seem to be any different in 2024r3(.1) so probably not fixed)
Indeed it seems to have been a combination of URLConnection and DoEvents; The fix will be in 2024r4’s URLConnection. I’ll be waiting for that instead of reworking a ton af API calls to MBS Curl.
[Not] about App.DoEvents crashing but primarily involves a bug that occurs when URLConnection.Disconnect is called while concurrent asynchronous sessions are still active. [For 2024R4] URLConnection.Disconnect now correctly aborts an asynchronous session, preventing crashes that could occur if App.DoEvents is called *an unexpected reentrant event loop action is fired by the user* during the connection’s shutdown process.