PLBWIN_DEADLOCKTIMEOUT Keyword


PLBWIN Only

PLBWIN_DEADLOCKTIMEOUT={seconds}

 

This keyword should only be used in special situations.

 

This keyword specifies the number seconds the runtime should wait in an implied FILEPI enqueue lock before giving an error. An implied FILEPI enqueue locks an AFILE or IFILE for a file IO statement when a FILEPI instruction is not used. When using the Windows OS, it is possible that user applications can cause a deadlock hanging situation if the user applications access multiple files and the applications apply locks in different orders. By default this keyword is not used by the PLBWIN runtime.

 

If the {value} is set to a non-zero value less than sixty (60) seconds, the minimum time out of sixty seconds is used. Time out values larger than 60 seconds can be used depending on the circumstances. If the deadlock timeout time is exhausted while waiting for an implied FILEPI enqueue lock, an I28 error occurs. If an I28 error occurs, the user should evaluate all applications in use and determine if a file locking order problem exists.

 

The following programs give an example that can result in a deadlock hanging situation.

Program 1:

IFILE1

IFILE

;FILE1.TXT and FILE1.ISI

IFILE2

IFILE

FILE2.TXT and FILE2.ISI

.

 

 

 

Open

IFILE1,"FILE1"

 

Open

IFILE2,"FILE2"

.

 

 

 

LOOP

 

 

FILEPI

99;IFILE1

 

READ

IFILE2,KEY;S$CMDLIN ;Can hang indefinitely!

 

...

 

 

FILEPI

0

 

REPEAT

 

Program 2:

 

IFILE1

IFILE

;FILE1.TXT and FILE1.ISI

IFILE2

IFILE

;FILE2.TXT and FILE2.ISI

.

 

 

 

Open

IFILE1,"FILE1"

 

Open

IFILE2,"FILE2"

.

 

 

 

LOOP

 

 

FILEPI

99;IFILE2

 

READ

IFILE1,KEY;S$CMDLIN ;Can hang indefinitely!

 

...

 

 

FILEPI

0

 

REPEAT

 

 

 

See Also: PLBWIN Keywords, Compiler and Runtime Options

 



Compiler and Runtime Options PLB_CURRENCY Keyword PLB_DEBUG Keyword