uid {interprocess}R Documentation

Generate Names

Description

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.

Usage

uid()

hash(str)

Arguments

str

A string (scalar character).

Details

uid()s encode sequential 1/100 second intervals, beginning at the current process's start time. If the number of requested UIDs exceeds the number of 1/100 seconds that the process has been alive, then the process will momentarily sleep before returning.

A uid() begins with an uppercase letter (A - R); a hash() begins with a lowercase letter (a - v).

Value

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

Examples


    library(interprocess)
    
    uid()
    
    hash('192.168.1.123:8011')
    

[Package interprocess version 1.3.0 Index]