Thread View: comp.lang.oberon
1 messages
1 total messages
Started by Marc Martin
Wed, 03 Apr 1996 19:00
Oberon/F multi-tasking alte
Author: Marc Martin
Date: Wed, 03 Apr 1996 19:00
Date: Wed, 03 Apr 1996 19:00
45 lines
2775 bytes
2775 bytes
Subject: Oberon/F multi-tasking alternatives?
This is a question regarding the Oberon/F framework -- thanks in advance for
any replies!
I recently ported over a CPU-intensive program from the Macintosh API to the
Oberon/F framework. Since this program can take several minutes to complete
a single task, I'd like to make it run in the background so that I can do
other things while it is executing.
When this program was implemented using the Macintosh API, I implemented
cooperative multitasking by merely inserting calls to a procedure which would
check and clear the event queue. This method seemed fairly straightforward,
did not force me to restructure my code, and allowed me to easily experiment
with how many calls I needed to make the system responsive.
Now I'm looking at what the Oberon/F framework has to offer in this area.
The "Action" object in "Controllers" ("Services" in v1.2) seems to be the
only support for cooperative multitasking. However, unlike my Macintosh API
solution, this feature wants me to rewrite all of my loops into recursive
procedure calls. The system then does other processing in between these
calls.
While the Oberon/F solution is probably not so bad for simple loops, my
program is not so simple. It uses a black-box Fortran DLL which calls my
Oberon/F procedures as it pleases, and these procedures have loops within
loops within loops. I'm sure there is probably some way to rewrite all of
this to work using Oberon/F actions, but I don't think it would bear much
resemblance to the original code, it certainly wouldn't be easy to read, and
it certainly wouldn't be easy to adjust system responsiveness.
I'm wondering -- is there another way to implement background tasks within
Oberon/F? Something similar to the way I did it on the Macintosh API would
be ideal...just a single procedure to allow other processing and then let my
program continue. Perhaps Oberon Microsystems would even consider adding
such a feature to Actions in the future.
I'd envision something like the below (with a much shorter procedure name!):
PROCEDURE (a: Action)
AllowOtherProcessingForTheMomentThenContinueThisAction
Marc Martin
Marc.Martin@msd.ds.boeing.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads