Skip to content

add unsuspendable block element to squirrel #15

Description

@Dwachs

This is a corollary to #14 :

If scripts can be suspended, handles to c++ objects may become invalid, with no possibility of the script to counter this. The only out is to embrace access to such objects by try/catch blocks - which is ugly.

Proposal: add block-element:

block(ops) {
  ... 
}

Which suspends vm before entering the block if less than ops are available.

Ops spend in the block can be counted, and the ops parameter can be increased accordingly during runtime.

Needs adjustments to sqvm.cc, sqcompiler.cc

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions