c++ - Coroutines or Stateful/resumable tasks with Chaiscript -
i use chaiscript
let users of application implement tasks or stateful algorithms using scripting language. these algorithms "depend on events during time". in other words, algorithms, scheduled application, should allowed yield
execution @ time , resume
whenever event interested in occurs (in case task rescheduled resumption). kind of support chaiscript
provide achieve this?
there has been various discussions surrounding implementation of co-routines , similar, nothing has been implemented yet.
see here: http://discourse.chaiscript.com/t/co-routines-in-chaiscript/33 , here: https://gitter.im/chaiscript/chaiscript?at=5557ceac076ab5646e6de3e8
depending on exact needs might possible have function return own continuation. pair of (value, function_to_get_next_value)
, since chaiscript support passing of function objects , lambda
Comments
Post a Comment