Hello!
UnknownLegend is very nice and I remark small improvement that is
avoiding conflicts in writing pages using semaphores for critical
sections. If you remember I suggested to use forbid/permit schema with
classic semaphores lately ... Actual solution is not absolutely o.k. If
you see at docs/addresses/save.page, there you can find this:
page critical: [
page
clearRefsCache;
saveFormat: (request text) request: request response: response
shelf: shelf book: book;
time: (Time now);
date: (Date today);
nameUnique: (request fieldsKey: 'name') book: book stripping:
'<@*>';
user: request user;
alertsFrom: request.
[page
getIpUser;
backup;
write;
sendAlerts: request response: response shelf: shelf book: book]
fork].
The forked process is inside critical section but if it will run, the
page is not guard with semaphore. Therefore I suggest to use
forbit/permit writing schema:
page
forbidWriting;
clearRefsCache;
saveFormat: (request text) request: request response: response
shelf: shelf book: book;
time: (Time now);
date: (Date today);
nameUnique: (request fieldsKey: 'name') book: book stripping:
'<@*>';
user: request user;
alertsFrom: request.
[page
getIpUser;
backup;
write;
sendAlerts: request response: response shelf: shelf book:
book;
permitWriting ] fork
Martin Baco