Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

CtreeAsynchronous

Deals with asynchronous threads launched by an application.

Short Name

CTASYNC()

Type

Utility

Declaration

LONG CtreeAsynchronous(LONG handle, NINT mode, VRLEN bufsiz, pTEXT bufptr)

Description

CtreeAsynchronous() deals with asynchronous threads (including flush threads) launched by an application. CtreeAsynchronous() can be used to determine the status of an asynchronous thread or to cancel the thread.

  • handle is the handle value returned by a function that launches an asynchronous thread (e.g., CTFLUSHX()).
  • mode is ctASYNC_STATUS or ctASYNC_CANCEL.

The bufsiz and bufptr parameters are ignored now. They are intended for future use if it is desirable to return information stored by an asynchronous thread.

At this point, only the thread that launched the asynchronous thread can call CtreeAsynchronous().

Return

Value

Symbolic Constant

Description

0

ctASYNC_completed

Thread completed successfully.

1

ctASYNC_cancelled

Thread canceled.

2

ctASYNC_notfound

handle not found.

3

ctASYNC_badmode

mode is bad.

4

ctASYNC_running

Thread is running.

negative

negative value

Negative of c-tree error code that terminated the thread.

See FairCom DB Error Codes for a complete listing of valid FairCom DB error values.

TOCIndex