Is it possible to pause the current state in V8 and continue the execution later, between process initializations, so the user can close the program and start it later? Example so the user can restarts its computer without any need to re-run the complete script again. Is it possible?
> Is it possible to pause the current state in V8 and continue the execution
> later, between process initializations, so the user can close the program
> and start it later? Example so the user can restarts its computer without
> any need to re-run the complete script again. Is it possible?
You can suspend a context by effectively not entering it, but you cant
"save" the context to disk and then read it and remember its state. You
can, however, write a routine that is called on quit that saves any state
you are interested in into a flat file (like s ave file) and then have your
initialization process read that file and re-initialize certain objects.
However, saving the entire environment context is not possible. I actually
don't know any language that can do this. (if you know one, let me know)
> You can suspend a context by effectively not entering it, but you cant
> "save" the context to disk and then read it and remember its state. You
> can, however, write a routine that is called on quit that saves any state
> you are interested in into a flat file (like s ave file) and then have your
> initialization process read that file and re-initialize certain objects.
> However, saving the entire environment context is not possible. I actually
> don't know any language that can do this. (if you know one, let me know)
> On Tue, May 1, 2012 at 9:01 PM, idleman <evoo...@gmail.com> wrote:
>> Well, in that case there is probably not possible, thanks anyway.
>> Den tisdagen den 1:e maj 2012 kl. 20:40:48 UTC+2 skrev Enerccio:
>>> I asked the same thing before and no one replied. I wouldnt get your
>>> hopes up.