TsgcWebSocketServer_HTTPAPI메서드 › UnShareList

UnShareList Method

ShareList로 이전에 획득한 공유(읽기 전용) 잠금을 해제합니다.

구문

procedure UnShareList;

설명

UnShareList는 ShareList가 획득한 공유 SRW 잠금을 해제하여 다른 reader가 완료하고 writer(새 연결, 연결 해제, LockList)가 배타적 잠금을 다시 획득할 수 있게 합니다. ShareList에 대한 모든 호출은 정확히 한 번의 UnShareList 호출과 짝을 이루어야 합니다. reader 코드가 예외를 발생시켜도 잠금이 해제되도록 try..finally 블록의 finally 분기에 호출을 배치하십시오. 미해결 ShareList 없이 UnShareList를 호출하면 정의되지 않은 동작이 발생합니다.

예제


oList := oServer.ShareList;
try
  // read-only iteration
finally
  oServer.UnShareList;
end;

메서드로 돌아가기