Ex: semaphore.dbf Process C(10) timestamp T Ex code: Insert into semaphore (Process,TimeStamp) value ( "Process1",datetime()) Insert into semaphore (Process,TimeStamp) value ( "Process2",datetime()) DoProcess("Process1","Process2") DoProcess("Process2","Process1") function DoProcess parameter tcToDo,tcWhenFinis local lDone ldone = .f. select Semaphore locate for process = tcWhenFinis if found() and rlock() Unlock locate for process = tcToDO if found() and rlock() &tcTodo select Semaphore unlock lDone = .t. endif endif return lDoneAnyway you get the idea.