Hi Bernd, On Tue 30 Nov 2021 at 23:14, Bernd Paysan <[email protected]> wrote: > Ok, seems to be a victim of the section code. Fixed in git head.
thanks for the fix and such quick response! > Preferred multitasker is unix/pthread.fs in the new Gforth. I have tested HEAD and it works. This is the test program /tmp/task1.fs: require ~/sw/gforth/tasker.fs : counter create , does> dup 2 swap +! @ ; 0 counter v1 1 counter v2 : task: $1000 newtask constant ; task: t1 task: t2 : t1& t1 activate begin pause v1 . 3000 ms again ; : t2& t2 activate begin pause v2 . 5000 ms again ; t1& t2& Run like this: ~/sw/gforth$ ./gforth -e -status -e 'include /tmp/task1.fs' A few observations: 1) tasker.fs consumes 100% CPU. Is it necessary? Or could it be somehow reduced? 2) I had to run ./BUILD-FROM-SCRATCH twice in order to get everything built. 3) I need to use full path for require even though I start gforth from the gforth directory. Is there a way to avoid absolute paths when the forth script is in a different directory? (I did not run sudo make install and use gforth from the gforth directory directly.) 4) In order to build gforth, ./install-deps.sh downloads about 0.5GB dependencies. 5) unix/pthread.fs works well. Why does gforth prefer pthread multitasker? Thank you Tomas
