JagSleep

Description

Suspend execution of the thread in which your component is running.

Syntax

void JAG_PUBLIC JagSleep (
            JagLong seconds)

Parameters

seconds

The number of seconds to sleep.

Usage

JagSleep suspends execution of the thread in which the current component instance is running. JagSleep is useful in service components that perform background processing in the run method. run typically loops forever, and calling JagSleep prevents your component from dominating the server’s CPU execution time.

JagSleep can only be called by a component that is executing within EAServer. This routine is not available to clients.

WARNING! In EAServer components, never call the sleep system routine or any other routine that suspends execution of the current process. Doing so suspends execution of the server. JagSleep suspends only the current thread, allowing components running in other threads to continue execution.