vrodedanya / naobi

Naobi language
https://vrodedanya.github.io/naobi/
MIT License
4 stars 0 forks source link

Ending issue #7

Closed vrodedanya closed 2 years ago

vrodedanya commented 2 years ago

Naobi interpreter is a sandbox for code blocks. Each of them starts after event occurs. That means that in moment of time there may be a situation when interpreter have 0 number of contexts to work. It's not a bad program behavior or something else. It's program's feature. So we have a issue with interpreter ending. If we have 0 number of contexts we doesn't end program. And when we does? Since it is a program's feature, so we need to exit program manually by call exit function or we would have infinity execution. Need to thought about adding compiler check of infinity execution or leave this issue for user

vrodedanya commented 2 years ago

And need to correct current program realization

vrodedanya commented 2 years ago

Handler can check that no more handlers expected and terminate program. If system have handlers that can be called multiple times we need to check on compile time that programmer has terminating program in his workflows

vrodedanya commented 2 years ago

Fix first part in eb614a4 Now by default invoke number is 1

vrodedanya commented 2 years ago

Thoughts One of naobi use case is a daemon so process interrupts can be only by os signals such as sigterm sigkill and e.t.c. This means that we don't need to check is program exits or not