ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Web-specific functions / Page functions
  • Operating mode
  • In which cases saving the context is not required?
  • Pre-launched sessions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Frees the AWP context in advance (on disk) to allow the other call on the same AWP context to be processed in parallel.
Remark: This function has no effect on the AWP contexts transmitted in a cookie.
Example
FreeAWPContext()
Syntax
FreeAWPContext([<Saves current context>])
<Saves current context>: Optional boolean
  • True if he current content of variables must be saved in the context.
  • False (default value) if the context must be closed without saving the possible modifications.
Remarks

Operating mode

The WEBDEV Application Server automatically protects each AWP context from the concurrent accesses :
  • At any time, a single AWP call is allowed to handle a given AWP context.
  • The other AWP calls that want to handle this context (which means the other calls from the same client/browser) wait for the first call to be over:
    • Eech call can access the last values.
    • The global operating mode is equivalent to the operating mode of standard WEBDEV sessions.
  • The AWP context is automatically freed (for the next call) after the execution of the last WLanguage process.
In some cases, this operating mode is not optimum.
For example, an Active WEBDEV Page for file download will continue to maintain the lock on the context during the entire execution of FileDisplay. This lock locks the other calls of the client to the application (downloading a second file in parallel for example).
In this case, FreeAWPContext indicates that the AWP context will no longer be used, so it can be freed.

In which cases saving the context is not required?

Closing the context without saving the possible modifications is useful in the following cases:
  • No variable was declared (or re-declared) yet: no call was made to DeclareAWPContext.
  • None of the variables found in the context was modified.
  • The modified variables have no importance.
  • The modifications of variables must not be carried over.
After FreeAWPContext is called, the other AWP context management functions should not be called.

Pre-launched sessions

If your project uses pre-launched sessions, this function must not be used in the project initialization event. This function must be used in the "Initializing the project after connection to the site" event.
Component: wd290page.dll
Minimum version required
  • Version 18
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help