WebThread
From Xojo Documentation
Supported Platforms Project Types: Web Platforms: macOS, Windows, Linux |
Class (inherits from Thread)
A Session-aware thread for use in web apps.
Events | ||
|
Properties | |||||
|
Methods | ||||||
|
Notes
Use of a WebThread prevents you from having to use WebSessionContext.
Allow the thread to go out of scope in order for the web framework to properly manage it. If you keep the thread alive (by having an infinite loop in its Run event handler), your sessions may not quit which could result in memory leaks.
Remember, threads stay in scope as long as they are active (running, sleeping, etc.)
The main reason to use a WebThread is that its session is retained. That means that if you do anything that would require manipulating the session, the framework can accurately figure out which session it belongs to. If you're doing something that is not session sensitive, you could use a regular Thread. |