has it own stack so when launching a thread which multiple times ( the same function ) does this mean no datarace will occur ?and data races basically only happens at heap ?
                  
                  
                
Data race can occur when you access the same data from multiple threads (reading and writing same data at the same time). It can be data on stack as well if someone passes a reference/pointer to something on the stack to another thread.
 Adrian
                          
                        
                      
                    
                    
                    
                    
                      Автор вопроса
                      
                      
                        
                          Adrian
                          
                        
                      
                    
                    
                    
                    
                      Автор вопроса
                    
                    
                  I know but the problems is that when with each thread a new stack frame created then i dont see how a data race can occure
Обсуждают сегодня