smalltalk
/
osmo-st-core
Archived
1
0
Fork 0
Commit Graph

17 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther f2be904848 timer: Prevent a potential race with the loop process resumption
It is possible that the "loop" has determined there are no pending
timers but then the insertion application is executing and is
inserting a timer. Once the loop is executing again it will sleep
as there was no timer and we will miss the wake-up until there is
another timer.
2014-07-27 10:21:16 +02:00
Holger Hans Peter Freyther 5c7b52662c timer: Implement the shutdown for GNU Smalltalk too. 2014-07-27 09:41:15 +02:00
Holger Hans Peter Freyther f5c5febae8 timer: Merge the timer changes from norbert and some races fixes
Allow timers < 1 second and have the timer loop wait for the
closest time. This is not completely race free yet.
2014-07-27 09:31:51 +02:00
Holger Hans Peter Freyther 699eb31206 timer: Assign the loop _before_ running the process
Avoid a potential race condition. Assign the loop variable before
starting the process. Otherwise the effect on loop could be that a
terminated process is being assigned.

Spotted while reviewing a problem Norbert experienced in Pharo
2014-07-21 12:41:22 +02:00
Holger Hans Peter Freyther 9e0df13ec7 timer: Forget about the block to help the GC
After a timer has been canceled we can forget about the block
that was supposed to be canceled. It is only a matter of time
until the timer will be discarded by the TimerScheduler.
2014-03-14 18:07:52 +01:00
Holger Hans Peter Freyther ed74b0c1ca timer: Another approach to fix the issues on Pharo
Pharo's DateAndTime/Delay and VM interaction is bogus. If we execute
DateAndTime/Delay too early things will get stuck and take 100% of
the CPU.
2014-02-12 17:15:20 +01:00
Holger Hans Peter Freyther 3e2be093de delay: Try to make it work better on Pharo
Do not attempt to terminate a process, just signal the lastDelay
to kick the queue again.
2013-10-07 11:49:02 +02:00
Holger Hans Peter Freyther 5e571e0e69 misc: Avoid using the CharacterArray>>% as it is not available in Pharo 2013-02-20 15:47:22 +01:00
Holger Hans Peter Freyther ced5898a31 pharo: The TimerDispatcher needs more work on Pharo for image resume
In Pharo the Delay>>wait for one second will not expire anytime soon
in a new image. Use the depedency handling so we can terminate and
restart the loop.
2013-02-20 09:34:21 +01:00
Holger Hans Peter Freyther 2b81cc18c6 process: Name all processes started by osmo-core 2012-08-08 18:02:37 +02:00
Holger Hans Peter Freyther 2390e42814 core: Add proper categories to the class, call it OsmoCore 2011-09-27 16:09:34 +02:00
Holger Hans Peter Freyther 22f6836925 timer: Try to avoid copying the entire timerlist all the timer
Make sure that we only remove from one process, this way we can
check if the list is empty without having a lock. The list is sorted
so even if we get interrupted between the [condition] whileFalse: [res]
and someone adds an older timer, it is okay to use this timer.
2011-07-06 16:56:09 +02:00
Holger Hans Peter Freyther 49c376dbf6 timer: Dispatch the whole timer in the main block. 2011-06-29 00:32:27 +02:00
Holger Hans Peter Freyther 3386942ce2 dispatcher: Introduce a dispatcher than can dispatch things...
When dispatching everything in the same context we avoid all kind
of issues with locking. If we use a truely multi threaded VM we could
probably use multiple dispatchers.
2011-06-28 19:50:31 +02:00
Holger Hans Peter Freyther 6595b815c9 timer: Fix the comments, try to be more clear about what happens 2011-06-28 11:54:27 +02:00
Holger Hans Peter Freyther 8fd1c00968 timer: Ignore already removed timers 2011-06-22 16:59:33 +02:00
Holger Hans Peter Freyther 4570878f9a timer: Add the initial version of the timer code
The code comes from the OsmoGSM repository but didn't have a
lot of history.
2011-06-22 15:21:09 +02:00