Four Js Development Tools Forum

General => Ask Reuben => Topic started by: Reuben B. on June 20, 2022, 06:38:32 am



Title: Ask Reuben 127 - Single Threaded
Post by: Reuben B. on June 20, 2022, 06:38:32 am
A common request is for a Genero application to start something in the background and react when that background process has finished.  That might be something like running a batch process in the background and display a message to the user when it has finished. There are many variations on this request but the common element is to have the Genero application respond “straight away” based on some event.
 
The key to understanding why you can’t code what you are trying to code, and the key to understanding how to implement something that will achieve the business requirement, is to note that the Genero fglrun process is single threaded.  It is only ever doing one thing at a time, and it may need to finish that one thing before it can respond to an external event.
 
Rather than expecting to have Genero respond "straight away" to an external event, modify your expectations to having Genero respond "when it is ready" to an external event.

Read more at https://4js.com/ask-reuben/ig-127/