Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
  • Categories

    • Bits
    • Bytes
    • Chart
    • Conversions
    • Core
    • Database
    • Dataframe
    • Dataframe Or Lazyframe
    • Date
    • Debug
    • Default
    • Env
    • Experimental
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

job send for experimental

Send a message to the mailbox of a job.

Signature

> job send {flags} (id)

Flags

  • --tag {int}: A tag for the message

Parameters

  • id: The id of the job to send the message to.

Input/output types:

inputoutput
anynothing

Examples

Send a message to a newly spawned job

> let id = job spawn { job recv | save sent.txt }; 'hi' | job send $id

Notes

This command sends a message to a background job, which can then read sent messages in a first-in-first-out fashion with job recv. When it does so, it may additionally specify a numeric filter tag, in which case it will only read messages sent with the exact same filter tag. In particular, the id 0 refers to the main/initial nushell thread.

A message can be any nushell value, and streams are always collected before being sent.

This command never blocks.