Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b3dcee6

Browse files
committedJun 11, 2024
set_env: State the conclusion upfront
1 parent c8170e6 commit b3dcee6

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed
 

‎std/src/env.rs

+8-4
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)
Failed to load comments.