Spark's scheduler is fully thread-safe and supports this use case to enable applications that serve multiple requests(e.g. queries for multiple users).
使这个类成为线程安全的最简单方法是使用QMutex来保护数据成员:.
An easy way to make the class thread-safe is to protect all access to the data members with a QMutex:.
至于Rust,也许开发人员喜欢系统编程语言的速度,预防segfault的能力以及能保证线程安全。
As for Rust, perhaps developers like the systems programming language's speed, ability to prevent segfaults,and guarantee of thread safety.
使一个程序线程安全的一般方法是,当线程获得对共享资源的写权限时,需要对共享资源加锁。
The general method to make a program thread safe is to lock shared resources whenever write permission is given.
线程安全类封装任何需要的同步,以便客户端不需要提供它们自己的同步。
Thread-safe classes encapsulate any needed synchronization so that clients need not provide their own.
其中之一是使用线程安全的数据结构,如python队列模块中的queue。
One of them is to use thread-safe data structures like Queue from Python's queue module.
所以,如果你不需要线程安全的话,那么就使用ArrayList吧。
So if you don't need a thread safe collection, use the ArrayList or.
中文
Bahasa indonesia
日本語
عربى
Български
বাংলা
Český
Dansk
Deutsch
Ελληνικά
Español
Suomi
Français
עִברִית
हिंदी
Hrvatski
Magyar
Italiano
Қазақ
한국어
മലയാളം
मराठी
Bahasa malay
Nederlands
Norsk
Polski
Português
Română
Русский
Slovenský
Slovenski
Српски
Svenska
தமிழ்
తెలుగు
ไทย
Tagalog
Turkce
Українська
اردو
Tiếng việt