From 1febfc5e43736ef707faf7a2804d130d8634548e Mon Sep 17 00:00:00 2001 From: eunhhu Date: Sat, 26 Sep 2026 18:01:31 +0100 Subject: Tick a served app's timers and give its events the clock pure-serve sets the time an event sees to the wall clock when the event is applied, and the thread that runs an app with states (the connection thread alone, or the owner) ticks its timers on time: epoll waits no longer than the next tick, the owner's condition wait is timed to it, and the ticks due at once share one save, so a restarted server goes on from the stored ticks. The statistics count ticks. --- docs/design/008-module-format.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs/design/008-module-format.md') diff --git a/docs/design/008-module-format.md b/docs/design/008-module-format.md index c8dcc0c..1039358 100644 --- a/docs/design/008-module-format.md +++ b/docs/design/008-module-format.md @@ -264,6 +264,9 @@ text·리스트가 남을 때만 위치를 유지한다. 모르거나 두 번 오거나(`json_field`), 타입이 다르거나(`json_type`), JSON이 아니면(`json`) 400이고 요청은 실행되지 않는다. - **라우트는 작업 슬롯에 둔다.** 요청이 가리키는 것(문서, 보기, 입력)과 메시지 필드는 받을 때 풀어 슬롯별 표와 ingress에 둔다. 연결이 묶음 전에 끊겨도 받아들인 이벤트는 실행된다. 런타임 코어는 그대로다(키는 문서 키 또는 보기·입력 이름). +- **시간.** 요청의 이벤트는 적용되는 순간의 벽시계를 `now`로 본다. 앱을 돌리는 스레드(한 스레드면 그 스레드, 아니면 + 소유자)가 상태를 가진 앱의 타이머를 제때 틱하고, 틱들을 저장 한 번으로 저장한다. 그래서 다시 띄운 서버는 저장된 + 상태에서 이어서 틱한다. 대기는 다음 틱까지다(epoll의 대기 시간, 소유자는 조건 변수의 시한). - **POST 응답은 요청에서 빌린다.** 코어가 쓰기 결과를 요청 바이트에서 빌리게 하므로 HTTP로 받는 메시지의 핸들러는 메시지 필드만 응답할 수 있다(`reply score.name`). 시작할 때 확인한다. 상태에서 계산한 값은 보기로 읽는다. -- cgit v1.2.3