Merge branch 'master' into new_httpd

db4
Slava Pestov 2008-03-03 02:23:05 -06:00
commit 5061973b9b
4 changed files with 21 additions and 6 deletions

View File

@ -180,8 +180,7 @@ SYMBOL: sources-changed?
[ t sources-changed? set-global ] "vocabs.loader" add-init-hook
: refresh-all ( -- )
sources-changed? get-global
[ "" refresh f sources-changed? set-global ] when ;
"" refresh f sources-changed? set-global ;
GENERIC: (load-vocab) ( name -- vocab )

View File

@ -0,0 +1,17 @@
IN: alarms.tests
USING: alarms kernel calendar sequences tools.test threads
concurrency.count-downs ;
[ ] [
1 <count-down>
{ f } clone 2dup
[ first cancel-alarm count-down ] 2curry 1 seconds later
swap set-first
await
] unit-test
[ ] [
[
[ resume ] curry instant later drop
] "test" suspend drop
] unit-test

View File

@ -37,8 +37,8 @@ SYMBOL: alarm-thread
register-alarm ;
: call-alarm ( alarm -- )
dup alarm-quot try
dup alarm-entry box> drop
dup alarm-quot try
dup alarm-interval [ reschedule-alarm ] [ drop ] if ;
: (trigger-alarms) ( alarms now -- )
@ -46,8 +46,7 @@ SYMBOL: alarm-thread
2drop
] [
over heap-peek drop over alarm-expired? [
over heap-pop drop call-alarm
(trigger-alarms)
over heap-pop drop call-alarm (trigger-alarms)
] [
2drop
] if

View File

@ -8,7 +8,7 @@ SYMBOL: upload-images-destination
: destination ( -- dest )
upload-images-destination get
"slava@/var/www/factorcode.org/w/images/latest/"
"slava@/var/www/factorcode.org/newsite/images/latest/"
or ;
: checksums "checksums.txt" temp-file ;