nushell/crates/nu-command/src/system
Renan Ribeiro 2d868323b6
Inter-Job direct messaging (#15253)
# Description

This PR implements an experimental inter-job communication model,
through direct message passing, aka "mail"ing or "dm"ing:



- `job send <id>`: Sends a message the job with the given id, the root
job has id 0. Messages are stored in the recipient's "mailbox"
- `job recv`: Returns a stored message, blocks if the mailbox is empty
- `job flush`: Clear all messages from mailbox

Additionally, messages can be sent with a numeric tag, which can then be
filtered with `mail recv --tag`.
This is useful for spawning jobs and receiving messages specifically
from those jobs.

This PR is mostly a proof of concept for how inter-job communication
could look like, so people can provide feedback and suggestions

Closes  #15199

May close #15220 since now jobs can access their own id.

# User-Facing Changes

Adds, `job id`, `job send`, `job recv` and `job flush`  commands.

# Tests + Formatting

[X] TODO:  Implement tests
[X] Consider rewriting some of the job-related tests to use this, to
make them a bit less fragile.

# After Submitting
2025-04-26 23:24:35 +08:00
..
sys update sysinfo to 0.33.1 (#14982) 2025-02-03 06:33:23 -06:00
complete.rs Fix try not working with let, etc. (#13885) 2024-09-23 06:44:25 -05:00
exec.rs Remove required positional arguments from run-external and exec (#14765) 2025-01-16 06:10:28 +08:00
mod.rs Remove required positional arguments from run-external and exec (#14765) 2025-01-16 06:10:28 +08:00
nu_check.rs More precise ErrorKind::NotFound errors (#15149) 2025-02-22 11:42:44 -05:00
ps.rs add more columns to macos ps -l (#15341) 2025-03-20 09:53:19 -05:00
registry_query.rs Refactor I/O Errors (#14927) 2025-01-28 16:03:31 -06:00
run_external.rs Inter-Job direct messaging (#15253) 2025-04-26 23:24:35 +08:00
uname.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
which_.rs Add "whereis" and "get-command" to which search terms (#14797) 2025-01-10 17:55:41 -06:00