Product Documentation
Cadence Interprocess Communication SKILL Reference
Product Version IC23.1, June 2023

ipcSleep

ipcSleep( 
x_time 
) 
=> t

Description

Causes the parent process to be delayed for the given number of seconds.

While the sleep is in progress, incoming data from child processes is buffered. If handlers are defined, they are called and, if there are SKILL commands among the data, they are executed and their results sent back to the child process.

The ipcSleep function gives the programmer a way to break the sequence of evaluations and allow incoming data to take effect without having to return to the SKILL top level.

Arguments

x_time

Number of seconds for the parent to sleep.

Value Returned

t

Always returns t.

Examples

      handler = (lambda (cid data) 
when(index(data "cshrc")
path = data))
;; Look for the first occurrence of file .cshrc.
;; Do not spend more than n seconds looking
procedure( look_for_cshrc(n)
path = nil
n = n/2
cid = ipcBeginProcess("cd $HOME ; find . -name '.cshrc' -print" "" handler)
while(and(!path !zerop(n)) ipcSleep(2) n--)
ipcKillProcess(cid)
path
)
look_for_cshrc(150)
"./.cshrc\n"

Related Topics

Interprocess Communication Functions

ipcSleepMilli

ipcWait

ipcWaitForProcess


Return to top
 ⠀
X