Doug Coleman
a6f0abb9a2
Rename alarms -> timers
2010-06-10 16:39:13 -05:00
Doug Coleman
05227a0e76
- 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
99e3fe6a6e
Add a restart-alarm word that doesn't spawn a new thread
2010-05-24 22:59:25 -05:00
Doug Coleman
b3d6ab1d3b
- 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
0e32dafb38
Merge branch 'master' of git://factorcode.org/git/factor
2010-05-23 22:19:48 -05:00
Slava Pestov
75de44c2a5
alarms: new test case for interrupt race
2010-05-23 23:16:41 -04:00
Doug Coleman
591a77700d
Remove typo slot, fix scheduling formula, record initial iteration nano-count
2010-05-23 18:44:04 -05:00
Slava Pestov
c8af0e4d5c
alarms: add unit test for race condition
2010-05-23 18:38:37 -04:00
Doug Coleman
61184af840
Clarify and reword alarms documentation
2010-05-22 00:17:30 -05:00
Doug Coleman
09d2a7dbc7
Cleaner implementation of alarms. Separate creating alarm from starting/stopping them.
2010-05-21 20:29:25 -05:00
Doug Coleman
4116d8a159
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
0e496c8693
alarms: add a couple of unit tests
2010-05-21 19:09:01 -04:00
Doug Coleman
547746db9f
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
f3c9eab1f5
Simplify the alarms implementation a bit
2010-05-21 13:19:15 -05:00
Doug Coleman
61b9f7a6d5
- 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
f1e19aabdb
threads: simplify 'suspend' combinator
2010-03-28 08:29:53 -04:00
Doug Coleman
5793d2e2eb
update docs for new alarms changes
2009-11-23 19:49:47 -06:00
Doug Coleman
a37908e00e
store the current alarm in current-alarm
2009-11-23 19:19:34 -06:00
Doug Coleman
a0b13cdb2c
alarms: Stop repeated alarms after an error is thrown
2009-11-23 16:37:14 -06:00
Doug Coleman
c794c347a3
Merge branch 'master' of git://factorcode.org/git/factor
2009-11-21 18:16:23 -06:00
Doug Coleman
97288b8a04
remove >duration word and instead make a private >nanoseconds word in alarms
2009-11-21 18:01:25 -06:00
Slava Pestov
0612bc6177
Factor source files should not be executable
2009-11-21 17:50:43 -06:00
Slava Pestov
d001e0176a
alarms: pass correct parameter to sleep-until, fixes 100% CPU usage in UI
2009-11-21 17:46:10 -06:00
Doug Coleman
11c9c6004f
document nano-count, move monotonic-clock to hell
2009-11-18 16:33:10 -06:00
Doug Coleman
070393df70
use nano-count instead of monotonic counters, dont allow sleeping for
...
timestamps
2009-11-18 16:20:29 -06:00
Slava Pestov
f302cc3e2c
alarms: fix next-alarm word
2009-11-16 13:25:54 -06:00
Doug Coleman
49980be091
update docs for alarms
2009-11-30 16:38:57 -06:00
Doug Coleman
54de3addd9
make alarms use monotonic-clock
2009-11-30 16:31:47 -06:00
Doug Coleman
cc194416f9
Merge branch 'master' into startup
...
Conflicts:
core/bootstrap/primitives.factor
vm/run.hpp
2009-11-15 02:52:50 -06:00
Doug Coleman
f192d59498
better alarms docs
2009-11-14 23:28:18 -06:00
Doug Coleman
6b6e56a179
change add-init-hook to add-startup-hook, new add-shutdown-hook word
2009-10-19 22:17:02 -04:00
Keith Lazuka
405e5d015b
docs: change $subsection to $subsections
2009-10-02 12:15:48 -04:00
Doug Coleman
3f3d57032b
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
9bb70c2c4d
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