Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mt_wait(3xmt) — MAILbus 400 2.0C

Media Vault

Software Library

Restoration Projects

Artifacts Sought

mt_wait(3xmt)  —  Subroutines

(c) Digital Equipment Corporation. 1994. All rights reserved. 
 

Name

mt_wait − Indicates when a communique or a report is available for transfer in. 

Syntax

OM_return_code = mt_wait(session, interval, available)

Argument Data Type Access
session OM_private_object read only
interval MH_interval read only
available OM_boolean write only
return_code OM_return_code

C Binding

OM_return_code mt_wait (session, interval, available) OM_private_object session;
MH_interval interval;
OM_boolean ∗available;

Arguments

SessionAn established MT session between a Client and the Service; an instance of class Session. 

IntervalThe maximum length of time, in milliseconds, that the Service is to block the Client before returning. 

AvailableTrue if there is an available object on the queue when the routine is called, or if the call returns early when an object is placed on the queue. 

Description

 
This routine returns when a communique or a report is available for inbound transfer in the input queue, or when a period of time elapses, whichever occurs first.

If there is at least one unreserved object on the input queue, the call returns immediately and indicates that an object is available. 

If there are no unreserved objects on the input queue and the specified interval is zero, the call returns immediately and indicates that no object is available. 

If there are no unreserved objects on the input queue and the specified interval is greater than zero, the call returns after the specified interval has elapsed, or when the Service places a new object on the queue, whichever occurs first. If the call returns after the specified interval has elapsed, availability is false. If the call returns when the Service places a new object on the queue, availability is true. 

If there are multiple sessions waiting on a single queue when an object arrives on the queue, the Service returns to the first session that called the routine but not to the other sessions. 

Return Values

MH_RC_FEATURE_UNAVAILABLE

OM_MEMORY_INSUFFICIENT

OM_NETWORK_ERROR

OM_SUCCESS

OM_SYSTEM_ERROR

MH_RC_WRONG_CLASS

Plus errors returned from:

om_instance

Examples

 
This example uses an interval of 60000 milliseconds; that is, one minute.
 
    om_status = mt_wait (session, 60000, &available);

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026