|Frontier Tutorials / Working With Threads|
Threads. The term strikes fear in the hearts of programmers everywhere. But with a basic understanding of how threads work, coupled with careful programming, threads can provide great advantages to your programs.
Need to construct a web page and fill it in with data from an external database? Fire off the data request in a separate thread, so it executes while you build the rest of the page. Then substitute in the results.
Or fire off the data request, then return a partial page (using sendPartial) to the user while you wait for the search thread to complete.
Split a website search into multiple threads that search sections of the site separately, or fire off search queries to multiple search engines, then combine the results.
This tutorial is intended for fairly experienced programmers or scripters. It begins with an overview of threads, then focusses down on how to work with threads in the Frontier environment.
If you see a term that you don't recognize, or that you're not sure you understand, jump to the Glossary of Terms for a definition.
This tutorial will help you to speed up and streamline your web applications and CGIs. You'll get faster results by working while you wait.
|Keywords:||thread,threads,multithreaded,semaphore,semaphores,share,shared,shared data,parallel,parallel processing,CGI,CGIs,web,www,world wide web|
|Level of Difficulty:||Intermediate|