Skip to contents

To ensure broad compatibility across different operating systems, names of mutexes, semaphores, and message queues should start with a letter followed by up to 249 alphanumeric characters. These functions generate names meeting these requirements.

  • uid(): 14-character encoding of PID and microseconds since epoch.

  • hash(): 11-character hash of any string (hash space = 2^64).

Usage

uid()

hash(str)

Arguments

str

A string (scalar character).

Value

A string (scalar character) that can be used as a mutex, semaphore, or message queue name.

Examples


    library(interprocess)
    
    uid()
#> [1] "acHgb4k2HOdTo9"
    
    hash('192.168.1.123:8011')
#> [1] "Wi6cEskw2e0"