![]() | Products |
| Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
| Messages 11 to 13 of 13 total |
| Sat, Aug 9 2025 2:28 PM | Permanent Link |
Terry Swiers | Hi Ian,
> Where/how do you integrate this code into the App please? My first thought is in the OnRemoteTimeout event of the TEDBSession. The OnRemoteTimeout isn't going to work as that handles a different condition, not missing sessions. Here is the general list of what you need to figure out how to do in your program. 1. Create a thread class that receives a TEDBSession pointer, which gets saved off in the class for use later. 2. Configure the thread to run at idle priority. 3. Create a loop in the thread execute function that loops until the thread is terminated and sleeps for a second or so on each loop so you don't starve the other threads. 4. Keep track of the elapsed time and call call the ClearSessionNotFound from within Synchronize at the time duration of your choosing. 5 minutes is probably your best bet. 5. Reset the time duration count and repeat as necessary. 6. If you use dynamically created session objects, make sure that you wrap everything in an exception block and/or check to make sure that the session object still exists when it's called from the background thread. My integration is part of a larger highly specific scheduled background thread class hierarchy and relies on some high resolution timers, so it's not just something that I can throw up here. |
| Sat, Aug 9 2025 2:52 PM | Permanent Link |
Ian Branch | Ahhh. Tks Terry. Threads are no my favourite subject.
Will have a bash at it. Ian |
| Sat, Aug 9 2025 5:04 PM | Permanent Link |
Terry Swiers | > Threads are no my favourite subject.
Mine either. I just spent the last couple of months tracking down a threading issue with form creation and destruction timing. You may want to keep track of how long it's been between user activity events so you only fire it if the user is not actively using your app. Also check to see if you can lock the session manager before getting the server time |
| « Previous Page | Page 2 of 2 | |
| Jump to Page: 1 2 | ||
This web page was last updated on Saturday, May 9, 2026 at 08:16 AM | Privacy Policy © 2026 Elevate Software, Inc. All Rights Reserved Questions or comments ? |

