Thread Secure Web Applications - Why Is It Important?

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?

+3
source share
5 answers

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.

+2
source

. , java , . , , HTTP- , TCP-, , , , . , . , , - .

+1

( ) , -. , - , . - - .

, , , - - , . , / -.

, , , . .

+1

- . . , : .

? Apache ( IIS) , python. , .

+1

( , .)

Concurrency (: ) - - . (concurrency) " ", / ( , , , , , / ).

, , . , .

, CPython Python ( , / C), , , 't () , C/++. , . Err .

. .

+1

Source: https://habr.com/ru/post/1765437/


All Articles