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

30 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 4ff8679b49 dispatcher: Really merge it, verify that install is called 2014-07-27 11:11:40 +02:00
Holger Hans Peter Freyther c5f53b7d64 dispatcher: Merge code from Norbert to allow to install alternative dispatchers
Norbert introduced the MockDispatcher to get nice and direct
exceptions.
2014-07-27 10:48:51 +02:00
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 931f2a21d6 extensions: Add copyright statements from Pharo 2014-02-12 17:18:01 +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 a8e8ee1847 compat: Add >>#deprecated: for Pharo compat to indicate old methods 2013-04-30 14:14:21 +02:00
Holger Hans Peter Freyther 39dbe76bc7 pharo: Create >>#initialize methods that are called during load 2013-04-01 10:47:48 +02:00
Holger Hans Peter Freyther c9033c0aa0 pharo: Add a test case for ?: syntax of the macro expansion 2013-02-23 11:41:20 +01:00
Holger Hans Peter Freyther 147307900d pharo: Introduce the expandMacros related String classes from Pharo
The >>bindWith: or >>% is not available in Pharo and other dialects.
From a licensing point of view it is easier to introduce the Pharo
equivalent to GST than to use the GST code in Pharo. Add a simple testcase
for some parts of the API. Pharo doesn't appear to use the % and ?
syntax at all.
2013-02-23 11:10:15 +01: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 a01003265b dispatcher: Add a small testcase for the dispatcher in error conditions 2013-02-20 09:38:56 +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 9807973a46 dispatcher: Dispatch the blocks in a new process to avoid termination
Avoid the dispatcher process from being terminated. Dispatch the
block in a new context. This is easier than detecting the termination
and then respawn it.
2013-02-20 09:17:29 +01:00
Holger Hans Peter Freyther ff6db68e34 misc: Ignore the fileout.st generated by the convert target 2013-02-15 23:14:37 +01:00
Holger Hans Peter Freyther 01cfa6f4b8 pharo: Work on the automatic fileout to pharo
Remove the PackageLoader fileInPackage statement as it is conflicting
with the export as there is no PackageLoader in Pharo. Add a Makefile
to help with invoking the export and create a compat_for_pharo.st for
the methods not provided by Pharo. The testcase is working now.
2013-02-10 21:21:43 +01:00
Holger Hans Peter Freyther 35843c3654 misc: Modernize the category names to help with MontiCello grouping 2013-02-10 13:05:02 +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 6f2c4e98c7 dispatcher: Run the dispatch queue with a higher priority
We want the dispatching to happen faster, change the priority
and see how things will turn out.
2011-07-06 09:58:13 +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