Show Changes Show Changes
Print Print
Recent Changes Recent Changes
Subscriptions Subscriptions
Lost and Found Lost and Found
Find References Find References
Rename Rename
Administration Page Administration Page
Topic Locks Topic Locks

Search

History

4/28/2008 2:21:35 PM
-90.224.58.148
4/28/2008 2:20:45 PM
-90.224.58.148
4/28/2008 2:13:31 PM
-90.224.58.148
4/28/2008 2:11:33 PM
-90.224.58.148
List all versions List all versions

RSS feed for the SquirrelWiki namespace

Patches
.
Summary

Suspend/break a long running script

This patch adds the ability to interrpt or suspend a long running script. If suspended, the script can be resumed with standard API at a later point.

One can also do some application work (like driving a C++ GUI) inside the app QuerySuspend function.

Diff file (against Squirrel 2.5 work sources):

Source files:

How to use:

  int SQMyQuerySuspend( SQVM *vm ){ 
     if( /* too long time */ ){
       return SQ_QUERY_BREAK;
       // or return SQ_QUERY_SUSPEND; 
     }
     /* Do some processing / nothing */
     return SQ_QUERY_CONTINUE;
  }
  
  // In init section 
  SQVM *vm = /* from somewhere */;
  vm->SetQuerySuspendFn( SQMyQuerySuspend );
  // ... continue 
Not logged in. Log in

squirrel's community wiki

This is FlexWiki, an open source wiki engine.

Change Style

Recent Topics