Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb3dcee6

Browse files
committed
set_env: State the conclusion upfront
1 parentc8170e6 commitb3dcee6

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

‎std/src/env.rs‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,10 @@ impl Error for VarError {
323323
/// This function is also always safe to call on Windows, in single-threaded
324324
/// and multi-threaded programs.
325325
///
326-
/// In multi-threaded programs on other operating systems, we strongly suggest
327-
/// not using `set_var` or `remove_var` at all. The exact requirement is: you
326+
/// In multi-threaded programs on other operating systems, the only safe option is
327+
/// to not use `set_var` or `remove_var` at all.
328+
///
329+
/// The exact requirement is: you
328330
/// must ensure that there are no other threads concurrently writing or
329331
/// *reading*(!) the environment through functions or global variables other
330332
/// than the ones in this module. The problem is that these operating systems
@@ -390,8 +392,10 @@ unsafe fn _set_var(key: &OsStr, value: &OsStr) {
390392
/// This function is also always safe to call on Windows, in single-threaded
391393
/// and multi-threaded programs.
392394
///
393-
/// In multi-threaded programs on other operating systems, we strongly suggest
394-
/// not using `set_var` or `remove_var` at all. The exact requirement is: you
395+
/// In multi-threaded programs on other operating systems, the only safe option is
396+
/// to not use `set_var` or `remove_var` at all.
397+
///
398+
/// The exact requirement is: you
395399
/// must ensure that there are no other threads concurrently writing or
396400
/// *reading*(!) the environment through functions or global variables other
397401
/// than the ones in this module. The problem is that these operating systems

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp