-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multitasking/cororoutines #73
Comments
Yes, I have used cooperative MT with an active pause. I don't use it often, but all of my Forth systems are set up so pause can do the right thing. |
Hi Mitch,
Is there any way I can make use of this ?
…On Tue, 26 Jan 2021 at 19:12, Mitch Bradley ***@***.***> wrote:
Yes, I have used cooperative MT with an active pause. I don't use it
often, but all of my Forth systems are set up so pause can do the right
thing.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#73 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYVWSK3LWY73CCF2RIN7XLS34HYVANCNFSM4WTWD4NA>
.
|
I updated the multitasking code for CForth. Pull the latest commit and look at src/lib/test-tasking.fth |
Thanks for that. I'll take a look ASAP.
Regards,
Andrew
…On Sun, 7 Feb 2021 at 22:37, Mitch Bradley ***@***.***> wrote:
I updated the multitasking code for CForth. Pull the latest commit and
look at src/lib/test-tasking.fth
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#73 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYVWSLK62QL3P6RJOIOI2TS54I3TANCNFSM4WTWD4NA>
.
|
That sounds great. Kind regards, Jos |
A quick scan would suggest that you replace (pause with (pause) Haven't actually tried it yet, that's from observation. |
Hi Andrew, Thanks for the quick scan. Kind regards, Jos |
(pause is the correct name. |
Hi Mitch, The esp8266-rtos directory seems only to be present in the branch WIP and not in the branch MAIN \ Then in cforth I saw: ; |
Hi Mitch, After I made the changes manually in forth.c for the words \needs multi fl tasking.fth \ Tests and examples for cooperative multitasking \ Global variable used by the test tasks \ Explicit creation of word and task : do-count0 begin 1 counts0 +! pause again ; : do-count1 begin 2 counts1 +! pause again ; \ Combined creation of task with word to execute background counters2 begin pause again ; : .counts ( -- ) ." counts = " counts0 @ .d counts1 @ .d counts2 @ .d cr ; .counts : run-background ( -- ) begin pause key? until key drop ; .( Type a key to return to prompt) cr Output when counters3 is active: Output when counters2 is active: \ Manual changing: It seems pause does not run all tasks Thanks in advance, kind regards, Jos |
Hi, For those who are interested: See: and: It is all quite experimental. Kind regards Jos |
Hi Mitch,
I seem to recall asking you this question a very long time ago, when I was working at Sun, certainly last century.
Did you ever implement a co-operative task system for cforth ?
I see that pause is a deferred word, IIRC it was in openfirmware too.
Thanks
The text was updated successfully, but these errors were encountered: