Doug Coleman
e03a5b038e
Rename alarms -> timers
2010-06-10 16:39:13 -05:00
Doug Coleman
cff141f4b8
- Put back the good version of restart-alarm
...
- Don't sleep if the alarm is stopped before it starts
- Right before I committed, I changed the code. oops.
2010-05-24 22:59:26 -05:00
Doug Coleman
2cfcc16452
Add a restart-alarm word that doesn't spawn a new thread
2010-05-24 22:59:25 -05:00
Doug Coleman
616ad9a4a7
- Remove the alarms stop variable, and instead for a stop condition, check against the thread object being replaced.
...
- Interrupt the thread sleep when stopped, but only if the quotation is not currently running
2010-05-23 22:25:17 -05:00
Doug Coleman
e83777ff06
Merge branch 'master' of git://factorcode.org/git/factor
2010-05-23 22:19:48 -05:00
Slava Pestov
df7fef25ce
alarms: new test case for interrupt race
2010-05-23 23:16:41 -04:00
Doug Coleman
6edffb4482
Remove typo slot, fix scheduling formula, record initial iteration nano-count
2010-05-23 18:44:04 -05:00
Slava Pestov
0d529a09f1
alarms: add unit test for race condition
2010-05-23 18:38:37 -04:00
Doug Coleman
cfa736ab29
Clarify and reword alarms documentation
2010-05-22 00:17:30 -05:00
Doug Coleman
3a8aac8c76
Cleaner implementation of alarms. Separate creating alarm from starting/stopping them.
2010-05-21 20:29:25 -05:00
Doug Coleman
f1ffbd221d
Make the alarm test wait for the promise to be fulfilled instead of returning immediately and failing
2010-05-21 20:03:32 -05:00
Slava Pestov
2f3963d055
alarms: add a couple of unit tests
2010-05-21 19:09:01 -04:00
Doug Coleman
7df7c389c7
Change alarm start variable to store nano-count of start time instead of (nano-count + interval)
2010-05-21 13:28:03 -05:00
Doug Coleman
a87656a46c
Simplify the alarms implementation a bit
2010-05-21 13:19:15 -05:00
Doug Coleman
d03e326059
- Change alarms to run in a single spawned green thread instead of spawning a new thread for each iteration of the alarm so game.loop can use alarms -- the old behavior can be embedded by calling in-thread in your alarm handler quotation
...
- Remove current-alarm dynamic variable in favor of optionally passing the alarm on the stack to the quotation
- Reschedule alarms based on a multiple of the interval from the original start time to eliminate alarm drift over time
- Clarify alarm contract in docs
- Fix later example
2010-05-21 12:48:05 -05:00
Slava Pestov
910b7527c9
threads: simplify 'suspend' combinator
2010-03-28 08:29:53 -04:00
Doug Coleman
c077400df5
update docs for new alarms changes
2009-11-23 19:49:47 -06:00
Doug Coleman
333a45c1f5
store the current alarm in current-alarm
2009-11-23 19:19:34 -06:00
Doug Coleman
0b968cce9d
alarms: Stop repeated alarms after an error is thrown
2009-11-23 16:37:14 -06:00
Doug Coleman
584c44464a
Merge branch 'master' of git://factorcode.org/git/factor
2009-11-21 18:16:23 -06:00
Doug Coleman
ac184d3d11
remove >duration word and instead make a private >nanoseconds word in alarms
2009-11-21 18:01:25 -06:00
Slava Pestov
08b6ebc7fa
Factor source files should not be executable
2009-11-21 17:50:43 -06:00
Slava Pestov
65176e21e3
alarms: pass correct parameter to sleep-until, fixes 100% CPU usage in UI
2009-11-21 17:46:10 -06:00
Doug Coleman
595c8eb8b1
document nano-count, move monotonic-clock to hell
2009-11-18 16:33:10 -06:00
Doug Coleman
0053dccf85
use nano-count instead of monotonic counters, dont allow sleeping for
...
timestamps
2009-11-18 16:20:29 -06:00
Slava Pestov
caf8c5161b
alarms: fix next-alarm word
2009-11-16 13:25:54 -06:00
Doug Coleman
0a1f0fa903
update docs for alarms
2009-11-30 16:38:57 -06:00
Doug Coleman
181db0e160
make alarms use monotonic-clock
2009-11-30 16:31:47 -06:00
Doug Coleman
3323072613
Merge branch 'master' into startup
...
Conflicts:
core/bootstrap/primitives.factor
vm/run.hpp
2009-11-15 02:52:50 -06:00
Doug Coleman
3f2e4e3ea2
better alarms docs
2009-11-14 23:28:18 -06:00
Doug Coleman
6fa23d7ea4
change add-init-hook to add-startup-hook, new add-shutdown-hook word
2009-10-19 22:17:02 -04:00
Keith Lazuka
8f79ea91ba
docs: change $subsection to $subsections
2009-10-02 12:15:48 -04:00
Doug Coleman
d1ce837569
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places, minor refactoring
2009-08-13 19:21:44 -05:00
Slava Pestov
fb360498f3
Update usages of global ... change-at to use the new change-global combinator
2009-04-30 21:38:14 -05:00
Slava Pestov
05f3f9dcb9
Fixing unit tests for stack effect inference changes
2009-04-20 21:15:19 -05:00
Slava Pestov
7940020491
Untangling more dependencies
2008-12-08 16:02:31 -06:00
Slava Pestov
61836bc69a
Alarms don't start to lag if the alarm takes longer to execute than the interval itself
2008-11-23 00:14:04 -06:00
Slava Pestov
93e9e34175
Add $maybe markup element
2008-11-16 06:02:13 -06:00
Slava Pestov
c19f2257f4
Fix permission bits
2008-10-02 08:34:49 -05:00
Slava Pestov
79f3865f92
Add missing meta-data
2008-09-23 16:11:59 -05:00
Doug Coleman
022a90c843
add vocab-link in docs
2008-09-12 12:21:32 -05:00
Doug Coleman
f9a896607b
document every, dt -> duration
2008-09-04 18:14:24 -05:00
Doug Coleman
c1bd4a7cdd
new accessors, cleanups
2008-08-29 10:26:34 -05:00
Doug Coleman
524bce2dd2
Revert "make alarms use new accessors"
...
This reverts commit e91129ba10 .
2008-08-29 10:14:16 -05:00
Doug Coleman
e91129ba10
make alarms use new accessors
2008-08-28 23:42:59 -05:00
Slava Pestov
d66f887736
Create basis vocab root
2008-07-28 22:03:13 -05:00