Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
lyskom-elisp-client
lyskom-elisp-client
Commits
834ff123
Commit
834ff123
authored
Aug 03, 1992
by
Linus Tolke
Browse files
Continueing the prefetch-rewrite. The bugs get obscurer and obscurer.
parent
831db80f
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/ChangeLog
View file @
834ff123
Mon Aug 3 05:55:46 1992 Linus Tolke Y (linus@robin)
* async.el (lyskom-conf-fetched-p): required function.
* lyskom-rest.el (lyskom-go-to-next-conf): Prefetch of all
text-trees started on entrance.
(lyskom-end-of-command): Try to shut of prefetch while fetching
text to get next prompt.
* prefetch.el (lyskom-prefetch-limit): limit = 1;
MEMBERSHIPISREAD: new special type.
(lyskom-prefetch-one-item): Bugfix. lyskom-prefetch-textauth
shall fetch text-stat first.
(lyskom-prefetch-textauth-handler,
lyskom-prefetch-texttree-handler): handle error. This is needed
in all the prefetch-function handlers.
* startup.el (lyskom-fetch-until-we-have-an-unread): New function
to be called from lyskom-end-of-command.
(lyskom-decide-unread-conf): sets lyskom-membership-is-read to t.
Sat Aug 1 17:45:37 1992 Linus Tolke Y (linus@robin)
* prefetch.el (lyskom-prefetch-membership-handler,
...
...
src/async.el
View file @
834ff123
...
...
@@ -371,7 +371,21 @@ The text is converted, before insertion."
;; Give a message if the user is waiting.
(
lyskom-run
'async
'lyskom-default-new-text-hook
text-stat
)
(
lyskom-run
'async
'lyskom-prefetch-and-print-prompt
))
(
lyskom-run
'async
'lyskom-print-prompt
))
(
defun
lyskom-conf-fetched-p
(
conf-no
)
"Return t if CONF-NO has been prefetched."
(
let
((
n
(
1-
(
length
lyskom-membership
)))
(
result
nil
))
(
while
(
and
(
not
result
)
(
>=
n
0
))
(
if
(
=
(
membership->conf-no
(
elt
lyskom-membership
n
))
conf-no
)
(
setq
result
t
))
(
--
n
))
result
))
(
defun
lyskom-add-new-text
(
recipient
text-no
local-no
)
...
...
src/lyskom-rest.el
View file @
834ff123
No preview for this file type
src/prefetch.el
View file @
834ff123
...
...
@@ -124,7 +124,7 @@ See further documentation in the source code.")
;+++These should really be in vars.el:
(
defvar
lyskom-prefetch-limit
2
(
defvar
lyskom-prefetch-limit
1
"Number of prefetch requests the client will try to keep going
at a time."
)
...
...
@@ -147,9 +147,11 @@ at a time.")
"Prefetch the conf-stat for the conference with number CONF-NO.
If QUEUE is non-nil, put the request on it, otherwise put it on
lyskom-prefetch-stack."
(
if
queue
(
lyskom-queue-enter
queue
(
cons
'CONFSTAT
conf-no
))
(
lyskom-stack-push
lyskom-prefetch-stack
(
cons
'CONFSTAT
conf-no
)))
(
if
conf-no
(
if
queue
(
lyskom-queue-enter
queue
(
cons
'CONFSTAT
conf-no
))
(
lyskom-stack-push
lyskom-prefetch-stack
(
cons
'CONFSTAT
conf-no
)))
(
signal
'lyskom-internal-error
"No argument to lyskom-prefetch-conf"
))
(
lyskom-continue-prefetch
))
...
...
@@ -360,7 +362,7 @@ Return t if an element was prefetched, otherwise return nil."
;; Special request
((
and
(
listp
element
)
(
eq
(
car
element
'MEMBERSHIPISREAD
))
)
(
eq
(
car
element
)
'MEMBERSHIPISREAD
))
(
setq
lyskom-membership-is-read
t
))
(
t
(
signal
'lyskom-internal-error
...
...
@@ -389,8 +391,8 @@ Return t if an element was prefetched, otherwise return nil."
((
eq
(
car
request
)
'TEXTMASS
)
(
initiate-get-text
'prefetch
'lyskom-prefetch-handler
(
cdr
request
)))
((
eq
(
car
request
)
'TEXTAUTH
)
(
initiate-get-text
'prefetch
'lyskom-prefetch-textauth-handler
(
cdr
request
)
queue
))
(
initiate-get-text
-stat
'prefetch
'lyskom-prefetch-textauth-handler
(
cdr
request
)
queue
))
((
eq
(
car
request
)
'TEXT-ALL
)
(
initiate-get-text-stat
'prefetch
'lyskom-prefetch-text-all-handler
(
cdr
request
)
queue
))
...
...
@@ -435,8 +437,10 @@ Return t if an element was prefetched, otherwise return nil."
"Prefetch the conf-stat of the author of the text TEXT-STAT.
Put the request on QUEUE."
(
lyskom-stop-prefetch
)
(
lyskom-prefetch-conf
(
text-stat->author
text-stat
)
queue
)
(
lyskom-queue-enter
queue
'FINISHED
)
(
if
(
not
text-stat
)
nil
(
lyskom-prefetch-conf
(
text-stat->author
text-stat
)
queue
)
(
lyskom-queue-enter
queue
'FINISHED
))
(
--
lyskom-pending-prefetch
)
(
lyskom-start-prefetch
))
...
...
@@ -473,27 +477,29 @@ Put the requests on QUEUE."
"Prefetch all info neccessary to write the text with text-stat TEXT-STAT.
Then prefetch all info (texttree) of comments.
Put the requests on QUEUE."
(
lyskom-stop-prefetch
)
(
lyskom-prefetch-conf
(
text-stat->author
text-stat
)
queue
)
(
lyskom-prefetch-textmass
(
text-stat->text-no
text-stat
)
queue
)
(
lyskom-traverse
misc
(
text-stat->misc-info-list
text-stat
)
(
let
((
type
(
misc-info->type
misc
)))
(
cond
((
or
(
eq
type
'RECPT
)
(
eq
type
'CC-RECPT
))
(
lyskom-prefetch-conf
(
misc-info->recipient-no
misc
)
queue
))
((
eq
type
'COMM-IN
)
(
lyskom-prefetch-texttree
(
misc-info->comm-in
misc
)
queue
))
((
eq
type
'FOOTN-IN
)
(
lyskom-prefetch-texttree
(
misc-info->footn-in
misc
)
queue
))
((
eq
type
'COMM-TO
)
(
lyskom-prefetch-textauth
(
misc-info->comm-to
misc
)
queue
))
((
eq
type
'FOOTN-TO
)
(
lyskom-prefetch-textauth
(
misc-info->footn-to
misc
)
queue
))
(
t
nil
))))
(
lyskom-queue-enter
queue
'FINISHED
)
(
if
(
not
text-stat
)
nil
; We did not get anything
(
lyskom-stop-prefetch
)
(
lyskom-prefetch-conf
(
text-stat->author
text-stat
)
queue
)
(
lyskom-prefetch-textmass
(
text-stat->text-no
text-stat
)
queue
)
(
lyskom-traverse
misc
(
text-stat->misc-info-list
text-stat
)
(
let
((
type
(
misc-info->type
misc
)))
(
cond
((
or
(
eq
type
'RECPT
)
(
eq
type
'CC-RECPT
))
(
lyskom-prefetch-conf
(
misc-info->recipient-no
misc
)
queue
))
((
eq
type
'COMM-IN
)
(
lyskom-prefetch-texttree
(
misc-info->comm-in
misc
)
queue
))
((
eq
type
'FOOTN-IN
)
(
lyskom-prefetch-texttree
(
misc-info->footn-in
misc
)
queue
))
((
eq
type
'COMM-TO
)
(
lyskom-prefetch-textauth
(
misc-info->comm-to
misc
)
queue
))
((
eq
type
'FOOTN-TO
)
(
lyskom-prefetch-textauth
(
misc-info->footn-to
misc
)
queue
))
(
t
nil
))))
(
lyskom-queue-enter
queue
'FINISHED
))
(
--
lyskom-pending-prefetch
)
(
lyskom-start-prefetch
))
...
...
src/startup.el
View file @
834ff123
...
...
@@ -255,6 +255,7 @@ Optional argument CONF-STAT is used to check for a msg-of-day on the person."
(
not
(
zerop
(
conf-stat->no-of-texts
conf-stat
))))
(
lyskom-insert-string
'presentation-encouragement
))
(
lyskom-setup-prefetch
)
(
lyskom-stop-prefetch
)
(
setq
lyskom-membership-is-read
0
)
(
setq
lyskom-membership
nil
)
(
setq
lyskom-command-to-do
'unknown
)
...
...
@@ -321,6 +322,12 @@ Information required for this:
(
let
((
list
(
lyskom-array-to-list
membership
))
sent
)
(
lyskom-add-membership-to-membership
membership
)
(
lyskom-fetch-until-we-have-an-unread
list
)))
(
defun
lyskom-fetch-until-we-have-an-unread
(
&optional
list
)
"Call to fetch info until we have decided if we have an unread. (or are done."
(
let
((
sent
))
(
while
(
and
(
not
sent
)
list
)
(
if
(
and
lyskom-unread-confs
(
not
(
memq
(
membership->conf-no
(
car
list
))
...
...
@@ -335,10 +342,11 @@ Information required for this:
(
setq
list
(
cdr
list
)))
(
if
sent
nil
(
initiate-get-part-of-membership
'main
'lyskom-start-anew-login-3
lyskom-pers-no
lyskom-membership-is-read
lyskom-fetch-membership-length
))
(
if
(
numberp
lyskom-membership-is-read
)
(
initiate-get-part-of-membership
'main
'lyskom-start-anew-login-3
lyskom-pers-no
lyskom-membership-is-read
lyskom-fetch-membership-length
)))
(
let
((
reverse
(
reverse
lyskom-membership
)))
(
while
reverse
(
lyskom-prefetch-conf
(
membership->conf-no
(
car
reverse
)))
...
...
@@ -377,6 +385,7 @@ If not, fetch next conf-stat from REST-MEMBERSHIPLIST."
(
initiate-get-part-of-membership
'main
'lyskom-start-anew-login-3
lyskom-membership-is-read
lyskom-fetch-membership-length
)
(
setq
lyskom-membership-is-read
t
)
(
lyskom-run
'main
'lyskom-start-anew-login-3
'cont
)))))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment