[mw-devel] [Git][arthur/mw][master] duktape: Implement js_isrunning()

Andrew Price welshbyte at sucs.org
Wed Jul 19 22:16:04 BST 2017


Andrew Price pushed to branch master at Justin Mitchell / mw


Commits:
89b6c0e3 by Andrew Price at 2017-07-19T22:14:38+01:00
duktape: Implement js_isrunning()

duktape has no equivalent of JS_IsRunning() so use the state of the
timeout tracking bits to approximate it.

- - - - -


1 changed file:

- src/client/js-duk.c


Changes:

=====================================
src/client/js-duk.c
=====================================
--- a/src/client/js-duk.c
+++ b/src/client/js-duk.c
@@ -612,7 +612,7 @@ static duk_ret_t js_dbquery(duk_context *cx)
 
 int js_isrunning(void)
 {
-	return 0;
+	return (interrupt == 0 && timeout_event != NULL);
 }
 
 int js_exec(char *name, int argc, const char **argv)



View it on GitLab: https://projects.sucs.org/arthur/mw/commit/89b6c0e33daa54a2010dabd396a2ccfcc26831b9

---
View it on GitLab: https://projects.sucs.org/arthur/mw/commit/89b6c0e33daa54a2010dabd396a2ccfcc26831b9
You're receiving this email because of your account on projects.sucs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/mw-devel/attachments/20170719/c2a6b740/attachment.html>


More information about the mw-devel mailing list