How does static code run with multiple threads?

后端 未结 6 895
青春惊慌失措
青春惊慌失措 2021-01-04 06:38

I was reading Threading from within a class with static and non-static methods and I am in a similar situation.

I have a static method that pulls data from a resourc

6条回答
  •  萌比男神i
    2021-01-04 07:13

    Yes, the method should be able to run fine in multiple threads. The only thing you should worry about is accessing the same file in multiple threads at the same time.

提交回复
热议问题