Why is this related to thread safety in a web application? Pylons (the Python web framework) uses a global application variable that is not thread safe. Does it matter? Is this just a problem if I intend to use multithreading? Or does this mean that one user may not update the state if another user ... I'm just confusing myself. What is important with this?
Threading errors can lead to serious and subtle issues.
Say your system consists of 10 people. Another user subscribes to your system, and the application adds it to the list and increases the number of participants; “at the same time”, another user quits, and the application removes it from the registry and reduces the number of members.
If you do not handle threads correctly, your membership account (which should be 10) can easily be 9, 10, or 11, and you can never reproduce the error.
So be careful.
. , java , . , , HTTP- , TCP-, , , , . , . , , - .
( ) , -. , - , . - - .
, , , - - , . , / -.
, , , . .
- . . , : .
? Apache ( IIS) , python. , .
( , .)
Concurrency (: ) - - . (concurrency) " ", / ( , , , , , / ).
, , . , .
. .
Source: https://habr.com/ru/post/1765437/More articles:ASIHTTPRequest Failed to create request (bad url?) Error - iosПри запуске на Phusion-пассажире Bundler не может найти каталог Rails - rubyChrome New Tab Event - eventsWhat happens first: init or preDispatch? - phpКак я могу печатать объекты javascript? - javascriptHow can I create PDF files using the Play Framework and the Google App Engine? - google-app-engineImage created programmatically? - phpinserting data in the middle of a text file through java - javaMysql: calculate frequency of visits - mysqlHow do F # custom types map to CLR types? - c #All Articles