Is std::ifstream thread-safe & lock-free?

后端 未结 3 1694
小鲜肉
小鲜肉 2020-12-18 09:17

I intend to perform opening for reading a single file from many threads using std::ifstream. My concern is if std::ifstream is thread-safe & lock-free?

More deta

3条回答
  •  隐瞒了意图╮
    2020-12-18 10:14

    All std libraries are thread safe but not "async" safe. So you can call the same functions from different threads but not on the same objects.

提交回复
热议问题