Thread or instance in fcgi model lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- egsuh · 2018-03-26 06:28 Hi, I'm developing a web server using FastCGI model on MS Windows. My question is regarding accessing a variable. Specifically let's assume that I define variables like followings. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i interface type  TwmDC1 = class(TFPWebModule)  public   var1 : integer; end;  var    var2: integer; In this case, if there are more than two accesses (requests) from browsers at the same time, are var1 and var2 shared by the requests or not? Why are they shared or not? Is it related with thread or instance? Regards, ---------------------------------------------------------------------- Leledumbo · 2018-03-26 10:06 This depends on the value of Kind property, if wkOneShot, a module lifetime is per request. Otherwise, it's created once and live for as long as application lives (shared instance, so concurrent requests are handled by the same instance -> module variable values are shared -> take care of the concurrent access yourself).