作者:每天吃的饱饱的 | 来源:互联网 | 2023-05-18 10:18
AssumeIhaveanarrayofitemsandeachGETcallmakeachangeonthisarray(maybeaddremoveshi
Assume I have an array of items and each GET call make a change on this array (may be add/remove/shift)
假设我有一个项目数组,每个GET调用都会对这个数组进行更改(可以添加/删除/移动)
Would that be "thread-safe"? I know that Node.js is a single-threaded, yet is there a possibility that two GET requests would be handled "simultaneously"?
会是“线程安全”?我知道节点。js是单线程的,但是有可能同时处理两个GET请求吗?
2 个解决方案